
Call/Use VB ActiveX Dll in Visual C
I'm having a similar problem. I (finally) generated a wrapper class
following instructions in MSDN article Q194873. This article also has
instructions for using the #import (I haven't tried those
instructions). Here's the URL:
http://support.microsoft.com/support/kb/articles/Q194/8/73.ASP
I'm having trouble passing parameters using the wrapper class.
Many of the VB functions pass string parameters by reference. This
generates a BSTR type parameter in C++. I haven't been successful in
passing parameters to any functions. Any suggestions/samples for
simply populating a BSTR variable and passing it as a parameter?
Thanks,
Brent
Quote:
> Thanks Joe! Can you post some source for the #import method? I am
still
> hazy on the solution.
> Thanks!
> justin hall
> > Yes, you can use ActiveX DLLs written in VB in Visual C++. The
> easiest
> > way is to get the ClassWizard to create a wrapper class for you (if
> you are
> > using MFC) or use the #import directive to take advantage of the
> compiler's
> > COM support. It will generate the various interface definitions and
> class
> > wrappers for you.
> > Regards,
> > Joe
> > > We have created an ActiveX Dll in VB6 (SP4). Can this be used in
> > > Visual C+? How do we call or load the DLL in a C compiler or
> > > specifically a Visual C+ compiler?
> > > If it can't be directly loaded or used how can we "wrap" it to
> make
> > > it work?
> > > Thanks for your help in advance.
> > > Justin
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
Brent
http://members.aol.com/brent1507
Sent via Deja.com http://www.deja.com/
Before you buy.