Using streaming Serial Data in VB.net v1.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crusson
    New Member
    • Mar 2008
    • 18

    Using streaming Serial Data in VB.net v1.0

    So VB 6.0 had MSComm. VB.net 2.0 has its own form for reading from the comm port, but VB.net 1.0 didn't. I've read that you were supposed to use MSComm for 1.0, but it appears to be unlicensed on my computer (I don't have 6.0?). Can anyone point me in the right direction. I want to read text streaming from a GPS over comm 1 into my program and use a certain part of the string to update the program.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    You don't have mscomm.dll?

    Comment

    • crusson
      New Member
      • Mar 2008
      • 18

      #3
      Originally posted by Plater
      You don't have mscomm.dll?
      I get an error at runtime:

      "An unhandled exception of type 'System.Runtime .InteropService s.COMException' occurred in ConsoleApplicat ion1.exe

      Additional information: Class is not licensed for use"

      it occurs:
      Sub Main()
      'New a MSComm control
      Dim MSComm1 As MSComm
      MSComm1 = New MSComm() <== here

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        I thought you were in .NET?
        You should be using DLLImport

        Comment

        • crusson
          New Member
          • Mar 2008
          • 18

          #5
          Originally posted by Plater
          I thought you were in .NET?
          You should be using DLLImport
          I am using .NET. I've never played with dlls at all in any programming so I guess I got some reading to do to figure them out. Any pointers as to where I should be looking?

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Check out DLLImport. Although I bet if you google mscomm in .NET you will find more solid examples.

            Comment

            Working...