Help using DLL's

smack Down

Diamond Member
Sep 10, 2005
4,507
0
0
I'm trying to call a method inside of a DLL using MS visual C. The error happens in the attached code.

Anyone have anyidea why I'm getting the error: "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.

I'm trying to call a C function in the DLL.
 

smack Down

Diamond Member
Sep 10, 2005
4,507
0
0
I fixed the problem I needed to use this type.
typedef BOOL (*LPFNDLLFUNC1)(BOOL, WORD, WORD);