calling a dll function that receives/returns a double from VB
Posted on 2003-03-02
im trying to pass a double type to a dll function that returns a double in VB. i get the error "bad Dll naming convention".
heres the VB function declaration:
Declare Function fnCPS_DateFormat Lib "CPS_DateFormat.dll" Alias "_fnCPS_DateFormat@8" (dblDate As Double) As Double
and heres the C++ function declaration:
extern "C" __declspec(dllexport) double WINAPI fnCPS_DateFormat(double dblDateDiff);
if the types are changed to int it works fine. is there something i need to do for i to work with doubles (pretty much 64 bit signed integers)