Passing a VB MSComm Control Object as a parameter
- From: stacy@xxxxxxxxxxxxxxxx
- Date: 28 Nov 2005 13:29:26 -0800
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
.
- Follow-Ups:
- Re: Passing a VB MSComm Control Object as a parameter
- From: Steve Gerrard
- Re: Passing a VB MSComm Control Object as a parameter
- From: J French
- Re: Passing a VB MSComm Control Object as a parameter
- Prev by Date: Re: Clip capture
- Next by Date: adding entry to Start Programs
- Previous by thread: CreateDesktop - a bit loopy?
- Next by thread: Re: Passing a VB MSComm Control Object as a parameter
- Index(es):
Relevant Pages
|