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

    Sending Binary data

    Does anyone know how to send binary data through the serial port? Can i have a sample of the source code? Thanks!


  2. #2
    Join Date
    Dec 1999
    Location
    Israel
    Posts
    101

    Re: Sending Binary data

    I don't know which version of VB you use. If it 5.0 or 6.0, everything you need to do, just
    set MSComm1.InputMode = 1, and after that define array of Byte, and send it, something
    like that:

    Dim bOutput(0 To 10) As Byte

    bOutput(0) = 1
    MSComm1.Output = bOutput

    But if you use VB 4 or less, you'd better use Win API functions
    like CreateFile(), WriteFile(), ReadFile().

    Good Luck!



  3. #3
    Join Date
    Aug 1999
    Posts
    10

    Re: Sending Binary data

    Thanks a lot!!! Ur code certainly works!!! And thanks for the prompt reply!!! Really appreciated!!!
    Thanks again!!!


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