
Problems converting from 16 bit to 32 bit
Quote:
>I am converting a 16 bit (VB4) project to 32 bit. The project as such
>runs, but it uses an external DLL which also has been converted from 16 to
>32 bit. The first call to this DLL gives "Specified DLL function not
>found". The DLL is found and loaded. Do I have to change the function
>declarations for the DLL in any way? Today they look like:
>Declare Function PFStart Lib "Lisalib.dll" (StartRec As Startdata) As
>Integer
More important, what is the DLL declaration?
If you're using VC++, declare the C++ function this way:
extern "C" __stdcall int PFStart(Startdata *StartRec) { ... }
and then export it with a DEF file.
If you're not able to change the DLL, then you need to find out the
"exported" name of the function. To avoid changing a lot of code use the
Alias clause:
Declare Function PFStart Lib "Lisalib.dll" Alias "<realname>" (StartRec As
Startdata) As Long
--
Henry S. Takeuchi
Seattle, Washington (USA)