CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    62

    serial (RS232) question

    byte xfr[3];
    xfr[0]= AA;
    WriteFile( h_Com, &xfr, 1, &BytesWrtn, NULL);

    If this sends only one element to rs232 port, how to send
    a whole binary file to serial port using same function?.

  2. #2
    Join Date
    Aug 2000
    Location
    Germany
    Posts
    115

    Re: serial (RS232) question

    Originally posted by pharma
    If this sends only one element to rs232 port, how to send
    a whole binary file to serial port using same function?.
    perhaps this helps?
    http://www.codeguru.com/Cpp/I-N/netw...icle.php/c2503

    If you have no protocol-library, you have to open your file for reading and send each Byte, close the file, etc...

    Ciao,
    Ferdinando

  3. #3
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    2,236
    Change the 1 to a 3.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured