
Custom eVC++ DLL Problem in eVB
I have developed a simple DLL in eVC that provides some complex math
calculations for my eVB client application.
I also ported the same code to VC++ and VB for PC users.
The Win32 PC application works fine every time.
The WinCE version simply stalls/freezes during testing and doesn't generate
any errors.
Example of the eVC DLL code
double APIENTRY DMSToDec(int Degrees, int Minutes, int Seconds)
{
//Implementation code
Quote:
}
double APIENTRY DecToRads(double DecValue)
{
//Implementation code
Quote:
}
Def file created and functions exported.
VB Definition
***********
Declare Function DMSToDec Lib "Windows\MYDLL.DLL" (ByVal Degrees as Integer,
Minutes as Integer, Seconds as Integer) as Double
Declare Function DecToRads Lib "Windows\MYDLL.DLL" (ByVal DecValue as
double) as Double
Now, I believe that the double data type is not valid for declaration
satatements, amoung others, so I converted the code accordingly.
Declare Function DMSToDec Lib "Windows\MYDLL.DLL" (ByVal Degrees as Integer,
Minutes as Integer, Seconds as Integer) as Variant
Declare Function DecToRads Lib "Windows\MYDLL.DLL" (ByVal DecValue as
Variant) as Variant
I also tried passing the variants ByRef. Nothing works. I now read that a
function declaration cannot return a variant. I'm confused... It appears
that I cannot use a declaration the returns any variation of a floating
point variable.
The lack of any error message except the occassional "fatal error in
pvbload.exe" and the fact I can't terminate the running app from within
WinCE has me stumped.
Any ideas would be appreciated.
Regards
Shane Brodie