PDA

Click to See Complete Forum and Search --> : VB ActiveX DLL - Possible to use ic C++?


Radar
Apr 4th, 2001, 02:32 PM
Hi All........
I'm kinda new at C++, but I need to build a simple demo app that will (hopefully) show some features of an ActiveX DLL that was written in VB. Is it possible to declare/use a VB ActiveX DLL in C++? I realize that the VB runtimes will need to be installed for the demo - no problem there. It seems that what I'm trying to do may be a bit backwards - I've heard alot about C++ DLL usage in VB, but almost nothing the other way around. If it helps, I'm using VC++ v6.0. Anyway, any help would be appreciated, and thanks alot in advance :)

- Radar

parksie
Apr 4th, 2001, 02:39 PM
The #import directive is what you need...for specifics you'd need to check the documentation :(

Basically, you just use:
#import "dllname.dll"
...and the compiler makes a load of other files to define the interfaces and so forth.

Radar
Apr 4th, 2001, 03:56 PM
Thanks Parksie.......
Just wondering though - does anyone know if it is or is not relatively common for users of languages such as C++ to use VB components in their apps? wondering if its worth mentioning in this DLL's docs that it can be used in C++. Anyway, thanks again.....I'll look closely at the #import directive :)

parksie
Apr 4th, 2001, 03:59 PM
It's not common, but if a component's written in VB and you HAVE to use it. Normally VB programmers use components written in C++.