
NEED help Calling a VC++ DLL from VB4
Quote:
>Problem: I want to call my own Visual C++ 4.0 DLL from Visual Basic 4.0.
>The problem is that when I call the DLL in Visual Basic I get a "Bad DLL
>calling convention" error. I need to be able to send numbers from VB4 into
>a DLL function that can, for example add them and return the sum to my VB4
>project. I'm more or less sure the problem is in variable declaration in
>one of the two. My Dll works if I call it from another Visual C++ project.
>1)Can someone send me Visual C++ source code that contains a function that
>adds two numbers and returns the sum. 2) Also need the VB4 code that calls
>the DLL function, sends two numbers into it and receives the sum.
> I've struggled with this for a while, so any help is appreciated.
Read the VB4DLL.TXT file in the directory you installed VB4.0. This
should help resolve your conflicts.
Jim Huguley
* Those who sit and think *
* Mostly sit *