Results 1 to 4 of 4

Thread: [VB6] Problems with MsComm in a DLL plugin for Road Runner

  1. #1
    Newbie DaveDevil's Avatar
    Join Date
    Jul 2007
    Posts
    36

    [VB6] Problems with MsComm in a DLL plugin for Road Runner

    Hy everybody...
    I'm becoming mad with a problem that I can't solve:

    in my visual basic 6 program, that is a plugin for road runner (a DLL),so it has not a Form, and I must use the com port.
    I initialize it with these two commands:

    Code:
    Dim MsComm1 As MSCommLib.MSComm
    Set MsComm1 = New MSCommLib.MSComm
    but while executing, the program says: "utilizzo non valido della parola chiave NEW", in english: "incorrect use of the keyword NEW"

    I searched help in google, but purposed solutions can't solve my problem...

    I tried this:

    1.
    Code:
    Dim MSComm1 as MsComm
    MSComm1 = CreateObject("MSCommlib.MSComm")
    but the program says that it can't create the ActiveX object

    2. writing only
    Code:
    Dim MSComm1 as MsComm
    but this time the program says that the variable is not defined...

    someone help me please!!!

  2. #2
    Maximum Bitrate Robby BMW's Avatar
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    558
    Create an invisible Form and place the MsComm control in it
    _______________________________________
    Car installation 95% [■■■■■■■■■■■■■■■■■■■]
    Current project: Parking sensor USB interface

  3. #3
    Newbie DaveDevil's Avatar
    Join Date
    Jul 2007
    Posts
    36
    uhm... but how can i "load" the form, if i'm using a DLL?

    I must load a invisible form every time that I call my function, and at the end close it?

    or simply when the skin loads, do all the events in the dll?

  4. #4
    Newbie DaveDevil's Avatar
    Join Date
    Jul 2007
    Posts
    36
    i think that i solved the problem:

    in the net i found this
    Code:
    Dim MSComm1 as MsComm
    MSComm1 = CreateObject("MSCommlib.MSComm")
    that i pasted directly in my program.

    but it's not correct, because in the second line i create an object that is already existing.

    so i had to modify in this:

    Code:
    Dim MSComm1 as Object
    MSComm1 = CreateObject("MSCommlib.MSComm")
    and it works perfectly!

    Thanks everybody!!!

Similar Threads

  1. Replies: 4
    Last Post: 12-27-2006, 03:22 PM
  2. Extension plugin problems
    By festy in forum Road Runner
    Replies: 2
    Last Post: 06-23-2006, 06:20 PM
  3. problems with video + road runner.
    By nealric in forum Road Runner
    Replies: 1
    Last Post: 01-14-2006, 09:37 PM
  4. Problems with Markus Zehender's plugin SA
    By bombboyer in forum General Hardware Discussion
    Replies: 5
    Last Post: 11-25-2002, 02:58 PM
  5. Lorty's plugin display problems, really weird
    By dudah85 in forum Software & Software Development
    Replies: 2
    Last Post: 08-07-2001, 11:59 PM

Bookmarks

Posting Permissions

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