ive created a DLL and im trying to call it but it keeps giving me these errors.
heres my codeRun-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.
cheersCode:#include <windows.h> typedef void (*MSGBOX)(char*,int); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HINSTANCE hDLL; MSGBOX msgProc; hDLL = LoadLibrary("dlltest.dll"); if(hDLL!=NULL) { msgProc = (MSGBOX)GetProcAddress(hDLL,"msgbox"); if(msgProc!=NULL) (*msgProc)("Batman its worked!", MB_OK); FreeLibrary(hDLL); } return 0; }![]()




Reply With Quote