Can I import a .DLL file made by Visual C++ 4.0 in Visual Basic 4.0? I made a .DLL file in Visual C++ 4.0 as a regular .DLL. It failed.
Jun Hur
You've gotten yourself into a .DLL pickle because your .DLL isn't quite kosher for Visual Basic. You don't import a .DLL into Visual Basic by linking to an export library, but you can get at the functions in the .DLL. You must export the function names from the .DLL. They cannot be C++ name-mangled (use EXTERN_C), and you must watch out for some differences between 16-bit and 32-bit Visual Basic and Visual C++. There is some great documentation on this (together with sample code) in VB4DLL.TXT in your Visual Basic root directory.