Click to See Complete Forum and Search --> : How can I call a MFC dll from vb?


sriky
February 1st, 2000, 01:34 PM
Do I need to write a COM object or can I call the function from vb? Which is more effective and how do I do that?

Thanks for all the help.

Spectre
February 2nd, 2000, 09:15 AM
If the dll is registered and contains or has a type library - then you can use the ObjectBrowser to find the syntax to call functions in the dll. If you don't have access to the type library (sometimes contained in the dll) then if you have the MFC sourcecode - you can use nmake to generate a type library. VB uses the type library to determine the datatypes and calling conventions for the functions in a dll.