1
votes

I got the VC++ source code of a dll for a USB device project, which the deadline is close. Right now I have to call this usb dll from another VB program. But the source code is based on the template "MFC Extension DLL", which can´t be called by VB. On the other hand, "Regular DLL with MFC statically linked" can be called by programs written in Visual Basic.

Is there a way, with the least effort of modification of the source code, to be able to call this dll directly from VB?

I tried to modify the project´s configuration properties/Use of MFC to Use MFC in a Static Library. But there is build error.

Now I am modifying the source code based on the new template "Regular DLL with MFC", but there is a lot of problems. For example, I don´t know whether I can use AFX_EXTENSION_MODULE in my new dll code.

1
"But there is build error" is the most unhelpful description of the problem one can imagine. How can anyone help you with that description?Roel

1 Answers

0
votes

Your problem is likely due to not implementing a CWinApp derived object which provides services that the MFC classes in the DLL rely upon. Probably you can just bung one in and it will work.

See here for more information: