Calling DLL functions from VB6.

Posted by Tim Ring on Stack Overflow See other posts from Stack Overflow or by Tim Ring
Published on 2008-09-02T13:11:25Z Indexed on 2010/04/30 6:17 UTC
Read the original article Hit count: 278

Filed under:
|
|

I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem?

I've declared all my public functions as follows:

define MYDCC_API __declspec(dllexport)

MYDCCL_API unsigned long MYDCC_GetVer( void); . . .

Any ideas?


Finally got back to this today and have it working. The answers put me on the right track but I found this most helpful:

http://www.codeproject.com/KB/DLL/XDllPt2.aspx

Also, I had a few problems passing strings to the DLL functions, I found this helpful:

http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml


© Stack Overflow or respective owner

Related posts about c++

Related posts about c