#BAD DLL CALLING CONVENT.
03-Oct-91 23:51:10
Sb: #1224-#BAD DLL CALLING CONVENT.
Fm: John Ruzicka 75160,2376
To: Don Funk 76701,155
Sorry for butting into this thread, but I have been unable to get VIsual
Basic to recognize a function in a DLL, and others have been unable to help
me. Everyone in this message seems to have at least gotten BC++ and VB to
"cooperate."
I compiled a DLL, using "all functions exportable," and containing a
function called "Chowmain" that returns an int.
IN BC++ I have the following:
extern "C" int Chowmain(void);
.. WinMain here …
extern "C" int Chowmain(void) {
return 1; }
IN VB, global module, I tried:
Declare Function Chowmain Lib "john.dll" ()
and Declare Function Chowmain Lib "john.dll" Alias "_chowmain" ()
(not at the same time)
I keep getting a Sub or Function Not Found message from VB.
I have tried virtually every combination of extern _export, etc., but
obviously am still not using the right one 🙂 Can anyone give me some help
or a simple example of how to call a BC++ function from VB? Thanks, John
Again, sorry for interrupting
There is 1 Reply.