hallo boarder,
ich habe folgendes problem:
-ich binde eine dll explizit ein,
code *.cpp:
typedef short int StartI2CDriver(int);
StartI2CDriver* lpfnDllStartI2CDriver;
VERIFY(hDLL = ::LoadLibrary("c:\\Windows\\System32\\LPTtoI2Cpro. dll"));
VERIFY(lpfnDllStartI2CDriver = (StartI2CDriver*)::GetProcAddress(hDLL,"StartI2CDr iver"));
short int m_nReturnVal;
m_nReturnVal = (short int)(lpfnDllStartI2CDriver)(1);
code *.h:
extern "C" __declspec(dllimport) short int StartI2CDriver(int device);
das wäre das
jetzt bekomme ich folgende fehlermeldung:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
was ist da los?
würde mich freuen wenn der eine oder andere mir helfen könnte
THX olaf
ich habe folgendes problem:
-ich binde eine dll explizit ein,
code *.cpp:
typedef short int StartI2CDriver(int);
StartI2CDriver* lpfnDllStartI2CDriver;
VERIFY(hDLL = ::LoadLibrary("c:\\Windows\\System32\\LPTtoI2Cpro. dll"));
VERIFY(lpfnDllStartI2CDriver = (StartI2CDriver*)::GetProcAddress(hDLL,"StartI2CDr iver"));
short int m_nReturnVal;
m_nReturnVal = (short int)(lpfnDllStartI2CDriver)(1);
code *.h:
extern "C" __declspec(dllimport) short int StartI2CDriver(int device);
das wäre das
jetzt bekomme ich folgende fehlermeldung:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
was ist da los?
würde mich freuen wenn der eine oder andere mir helfen könnte
THX olaf