Click to See Complete Forum and Search --> : c dll with VB6


November 25th, 1999, 02:27 AM
Hello

I try to write a C dll for VB6 and it do not work VB6 crash when calling the DLL
if anybody have a simple example ?
Thanks

Ravi Kiran
November 25th, 1999, 04:56 AM
What exactly are you trying to do?-)

All C fns in the dll should be decalred with _stdcall convention.
Then write all your export functions in a .def file, so that c compiler will not add decorations.
Add the def file to the project and build.

Then do a proper declarations of those functions in your vb program. Either copy the dll to the application directory, or specify the complete path in the declarations.

And then call them happyly

Check on this board, there should be one example (posted by me :-) ) even showing things like callback functions etc, Hope that is not a overdose..

RK