Passing a VB MSComm Control Object as a parameter



I have a VB 6 application that uses the MSComm control to communicate
with a BootStrap Loader on a TI Chip. I would like to create a DLL so
that other applications can call the BootStrap functions. I have
created an ActiveX DLL and in order to test that this will work, I
wanted to implement just one of the functions in the ActiveX DLL and
prove it out. The function I chose is startBSL, which sets/clears the
DTR and RTS signals to tell the TI Chip to go into BootStrap mode. I
moved the function into the ActiveX DLL as a method in the BSL class.
I call the method from the original VB 6 application and pass the
MSComm control to the DLL.

ActiveX DLL contains class BSL_Class
with the following method:
Public Function startBSL (ByVal pc_comm as Object) as Boolean

VB 6 application contains an MSComm control names MSComm1
and the following code:
Public BSLDLL as BSL_Class

Set BSLDLL = New BSL_Class

Ack = BSLDLL.startBSL(MSComm1)

The ActiveX DLL and the application build without errors, but when I
run the application, I get the following error on the BSLDLL.startBSL
line

run-time error '424' object required

I saw some postings that indicated I should be able to do this, but I
am running out of ideas. Help would be greatly appreciated,
Stacy

.



Relevant Pages

  • Re: Passing a VB MSComm Control Object as a parameter
    ... >I have a VB 6 application that uses the MSComm control to communicate ... >that other applications can call the BootStrap functions. ... >created an ActiveX DLL and in order to test that this will work, ... >DTR and RTS signals to tell the TI Chip to go into BootStrap mode. ...
    (comp.lang.basic.visual.misc)
  • ActiveX dll and MSComm
    ... I would like to create an ActiveX dll that can be downloaded and installed ... This website would then take values from the Active x ... MSComm control without a form to attach it to. ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)