CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    Canada
    Posts
    2

    Question I need Serial communications help.

    I have written a program writing in VB.Net, and I cannot seem to get 2 computers to send/receive a file. I wish I had example code to follow, but I cannot find any anywhere!
    I'm almost there, I only have this problem...
    the sending program says "waiting for start"
    and the receiving program says " receiving"
    I downloaded an active X control in order to give me some functions/methods to communicate.
    I tell it to SendFile, and it says "waiting for start"
    then eventually crashes and yeah...
    please help me out.
    my email is
    [email protected]
    Thx for your time.
    Jay
    Jay Jay

  2. #2
    Join Date
    May 2002
    Location
    Canada
    Posts
    2

    Figured it out.

    It takes a lot to communicate with the comm port in VB.NET
    First of all, all pc's must have .NET framework easily downloaded thru Microsoft.
    Next
    Since MSComm32.ocx only supported with VB6 you have to find a modified one. XMComm.OCX is what I used.
    Next
    MSComm32 still needs to be installed into the system folder in C: as well as XMComm and a stupid file called MSCOREE.DLL.
    NEXT
    All DLL and OCX Files must be registered specifically to each computer. Download a DLL/OCX reg. program to do that.
    All the functions of communicating with the serial ports are all located inside XMCommCRC.

    When writing the program there is a GUI in COMPONENTS that can be used from XMComm. That's what I used, and I'm sending and receiving files.

    As a Java programmer, I find VB.NET odd and restricting, but I still got this to work. I hope I haven't forgotten anything in this. But anyway, this knowledge is now everyones to absorb!

    -JayJay
    Jay Jay

  3. #3
    Join Date
    Jul 2002
    Location
    .NET 2.0/.NET 3.0/.NET 3.5 VS2005/VS2008
    Posts
    284
    There is another way:

    There are functions in the windowsapi that can do the job for you:

    CreateFile
    ReadFile
    WriteFile
    CloseHandle

    And one structure called DCB....

    I got that to work very easily in VB 6. But I can't find a way to get the same functions in VB.NET
    Someone knows how ?
    WM.

    What about weapons of mass construction?

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