-
Wie gesagt is wohl bei dir die calling convention das Problem.
Die Doku zu MessageBox() auf MSDN sagt:
int WINAPI MessageBox(
_In_opt_ HWND hWnd,
_In_opt_ LPCTSTR lpText,
_In_opt_ LPCTSTR lpCaption,
_In_ UINT uType
);
WINAPI ist definiert in WinDef.h und steht für __stdcall.
Daher müssen deine Definition so aussehen :
typedef int (WINAPI *MsgBoxFunc)(HWND, LPCSTR, LPCSTR, UINT);
int WINAPI HookedFunc(HWND, LPCSTR, LPCSTR, UINT)