berven
asked on
Importing C++ classes in Visual Basic
Is it possible to import a class exported from a Visual C++ DLL into Visual Basic (either 4.0 or 5.0)? If so how is this done?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. I was hoping I cound get away without having to wrap the class or implement it as an activeX object.
I read an article by Bruce McKinney called Extending Visual Basic with C++ DLL's (Microsoft Press April 1996) which led me to hope that this feature may be available in VB5.
Do you know if any other compilers (Borland Delphi or Borland Builder) can import C++ classes?
I read an article by Bruce McKinney called Extending Visual Basic with C++ DLL's (Microsoft Press April 1996) which led me to hope that this feature may be available in VB5.
Do you know if any other compilers (Borland Delphi or Borland Builder) can import C++ classes?
No feature has been added to VB5 that I know of regarding directly using classes from a C++ dll. There are name mangling issues, stack frame issues (the this pointer). I have never used Delphi, so I can't speak to that tool.
Creating an ActiveX control with Microsoft Visual C 5.0 is not that difficult. Microsoft provides wizards that create a class that has all of the required guts for an activex control and you add your own functionality as needed.
Creating an ActiveX control with Microsoft Visual C 5.0 is not that difficult. Microsoft provides wizards that create a class that has all of the required guts for an activex control and you add your own functionality as needed.
ASKER
I will give the ActiveX control a try. Thanks again.
ASKER