Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL question

Status
Not open for further replies.

idinkin

Programmer
Sep 12, 2002
29
0
0
IL
Hey everybody!
If I will create a dll in Visual C++ can I use the classes of Visual C++ in Visual Basic? If the answer is positive tell me please how can I do this...
Thanx!
 
Will the classes exported by AFX_EXT_CLASS work in Visual Basic?
 
No they won't. Extension dll's don't even work in plain C++; your executable must be MFC supported for them to work.

If you want to export classes to VB, you'll have to go into COM.
Greetings,
Rick
 
Can you please tell me how can I do this with COM?
 
That's a bit difficult to explain just here. You'll have to create a COM dll. I always use ATL for this. The ATL COM appwizard builds a framework for you (the COM dll, which houses the COM objects you're going to expose) and then you have to insert ATL COM objects yourself. I recommend you first do some reading about this though, because it's a quite different approach than "conventional" C++ programming.
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top