User Profile

Collapse

Profile Sidebar

Collapse
tawanda diza
tawanda diza
Last Activity: Oct 8 '12, 09:54 AM
Joined: Sep 19 '11
Location: Sandton, Gauteng, South Africa
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • tawanda diza
    started a topic Sending AT Commands to a modem

    Sending AT Commands to a modem

    Hie Team,

    I am currently develeping an application for windows mobile. I am using C#2008 for this.
    I am sending and receiving messages to and from a server via GPRS.

    At the moment i am using the

    Code:
    Socket Connect()
    '

    Code:
    ReceiveMsg(Socket socket, byte[] buffer, int offset, int size,int receiveTimeout)
    and
    ...
    See more | Go to post

  • tawanda diza
    started a topic menu items

    menu items

    hie all

    May someone please help me on how to view other events on the menu-items, i have got a dialog that has menu-items on it and the only events that are there are : click and PopUp. i am developing windows CE applications using c#.

    i am stopping a timer on PopUp event and i want it to start again as soon as the menu item has been closed.

    is there any where that i can put this timer code to start ...
    See more | Go to post

  • tawanda diza
    started a topic Timer stopping in c#

    Timer stopping in c#

    hie all.

    i am new to c#, ma y you please help me on how to stop a timer. i created a timer during design time.

    i am looking at some sources here and they say i must use
    Code:
    timer.stop();
    but when i try to use it i am getting an error saying
    Code:
    "error CS1061: 'System.Windows.Forms.Timer' does not contain a definition for 'stop' and no extension method 'stop' accepting a first argument of type 'System.Windows.Forms.Timer'
    ...
    See more | Go to post

  • tawanda diza
    replied to Converting Hex String to Bmp file
    in C
    johny10151981:

    yes i do. I am actually converting it back to a BMP image, but my picture doesnt look good at all, when i compare the hex values of my original picture and the one i create when i convert from hex to BMP, there is this "D0D0" in my converted output picture.

    i think im not writinhg it correctly:

    see illustration below, i have extractracted the first few hex values for the two pictures:...
    See more | Go to post

    Leave a comment:


  • tawanda diza
    started a topic Converting Hex String to Bmp file
    in C

    Converting Hex String to Bmp file

    hie Team.

    here is my scenario:

    1. i managed to convert a bmp image file to hex and then sending it to a server.
    see the following code
    Code:
    fp = fopen("\\C\\photo.bmp","rb");
    			fseek(fp,0,SEEK_END); //go to end
    			PicLen = ftell(fp); //get position at end (length)
    			PICBuffer = (byte *)malloc(PicLen); //malloc buffer
    			fseek(fp,0,SEEK_SET); //go to beg.
    ...
    See more | Go to post

  • tawanda diza
    started a topic NonBlocking Sockets retries
    in C

    NonBlocking Sockets retries

    Hie Team.
    I am using Visual C++ 2008, i have set a non blocking socket using
    Code:
    unsigned long iMode=1;
    ioctlsocket(hServer,FIONBIO,&iMode);
    nData = recv( hServer, &wzRec[iPos], 1500, 0 );
    could some one help on how to set a timeout of say like 10 seconds for this receive to time out if no data has been received within that time frame.

    as it is, my application exits even...
    See more | Go to post

  • tawanda diza
    replied to Disconnecting from server
    in C
    hie johny

    do yu have any idea on how to use this code for that problem above
    Code:
    struct timeval tv;
    
      tv.tv_sec = 3;  // 1 Secs Timeout 
    
      setsockopt(hServer, SOL_SOCKET, SO_RCVTIMEO,(char*)&tv,sizeof(struct timeval));
    I would be very grateful if you would tel me where exactly to put the code like what you told me in your first reply

    I am having problems with your...
    See more | Go to post
    Last edited by tawanda diza; Oct 21 '11, 09:38 AM. Reason: No clear clafication.

    Leave a comment:


  • tawanda diza
    started a topic Disconnecting from server
    in C

    Disconnecting from server

    Hie Team.

    I am having this problem:
    I am developing an application that is connecting to a server, the problem is when the server is not responding, the application wont allow me to do anything so i end up restarting the machine,

    i am receiving data using the receive function as follows
    Code:
    nData = recv( hServer, &wzRec[iPos], nLeft, 0 );
    please help

    thanks...
    See more | Go to post

  • tawanda diza
    replied to Binary Data Conversion
    in C
    HIE DONBOCK
    Code:
    char sizeinfo[4];
    nData = recv( hServer, &sizeinfo[0], 4, 0 );
    See more | Go to post

    Leave a comment:


  • tawanda diza
    started a topic Binary Data Conversion
    in C

    Binary Data Conversion

    i am receiving data from a server. the first 4 bytes represent the message length.

    when i try to debug what is in those four bytes, i see a funny character which looks like '￴'

    when i look at the hex value of this character on my wire shark application it will be F4.

    on the server side its shows that it has sent 244 bytes to me.( thats F4 = 244)

    my problem is: how do i convert the...
    See more | Go to post

  • hie Johny.

    how else can i save the contents of that dialogue beside using

    Code:
    sprintf_s(ReqInfo.Amount, 15,"%s",CT2CA(text));
     
      ReqInfo.Amount[text.GetLength()] = 0;
    THANKS
    See more | Go to post

    Leave a comment:


  • tawanda diza
    started a topic Copying Data from an Edit Control to a variable
    in C

    Copying Data from an Edit Control to a variable

    Hie Team.

    i am copying data from an EditControl called IDC_EDIT1 to a variable called ReqInfo.Amount

    i am using the followong code:
    Code:
    CEdit *DSP;
    CString text;
    
    DSP = reinterpret_cast<CEdit *>(GetDlgItem(AMOUNT));
    DSP->GetWindowTextW(text);
    	
    if(text.GetLength() == 0)
    {
     SetDlgItemText(IDC_STATIC_NOTIFY,L"Field is Blank");
    ...
    See more | Go to post

  • tawanda diza
    replied to Dialog Refreshing in Visual C++ 2008
    in C
    thanks you very, let me try to implement that and see what happens
    See more | Go to post

    Leave a comment:


  • tawanda diza
    replied to Dialog Refreshing in Visual C++ 2008
    in C
    Hie Johny10151981

    Could you please show me a code snipet on how to destroy this window

    my code snippet is like as follows:

    Code:
    void ProcessTransaction(char MSGTYPE)
    {
    CAccNumDlg AccNumDlg;
    if(AccNumDlg.DoModal() == IDOK) 
    {
       if(memcmp(RspInfo.rspcode,"00",2) != 0) return;
       
      CAmntDlg amntDlg;
      if(amntDlg.DoModal() == IDOK) 
      {
    ...
    See more | Go to post

    Leave a comment:


  • tawanda diza
    started a topic Dialog Refreshing in Visual C++ 2008
    in C

    Dialog Refreshing in Visual C++ 2008

    Could someone help me on how i can refresh my dialog only once soon after it loads.
    This dialog has an edit box which displays text from the previous dialog of which i dont want it to do that, i hope refreshing it may help overcome this.

    thank you in advance.
    See more | Go to post

  • tawanda diza
    replied to BinToHex conversion
    in C
    hie donbock

    yes i want the file written on the server to be identical to the original file.

    may be you can help me, the server is not accepting my binary data i.e "ÿØÿà JFIFÿÛ C 
    (1#% (:3=<9387@H\N@ DWE78PmQW_bghg> Mqypd x\egcÿÛ C//cB8Bccccccccccc ccccccccccccccc ccccccc"

    it understands data like "FFD8FFE000104A 464946000102010 04800480000FFE1 0C944578696600...
    See more | Go to post

    Leave a comment:


  • tawanda diza
    replied to BinToHex conversion
    in C
    what i wanted was to send the .bmp file to a server in hexformat, the server then stores it and will send me back when ever i request the data, the server will return it to me in hex format,then i have to convert it back to the original picture and display it on my screen.
    See more | Go to post

    Leave a comment:


  • tawanda diza
    replied to BinToHex conversion
    in C
    I cant believe this, this is great, Banfa thank you.
    i will integrate that into my app to send the data to the server.
    See more | Go to post

    Leave a comment:


  • tawanda diza
    started a topic BinToHex conversion
    in C

    BinToHex conversion

    Im a reading a bitmap from a file using
    fp = fopen("\\custph oto.bmp","rb");


    when i trace the data being sent it wil be like:

    "ÿØÿà JFIFÿÛ C 
    (1#% (:3=<9387@H\N@ DWE78PmQW_bghg> Mqypdx\egcÿÛ C//cB8Bccccccccccc ccccccccccccccc ccccccc"


    i want to send this picture to a server which only accepts hex values,
    ...
    See more | Go to post

  • tawanda diza
    replied to Reading a .jpg file in binary.
    in C
    Ooh that's great Advice Banfa,
    Thanks so much for the advice, i really appreciate this.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...