|
根据网上的资料写的函数
typedef HHOOK(__stdcall *SetWindowsHookExWProc)(int,int,HINSTANCE,DWORD);
void Initial(void)
{
HINSTANCE hCoreDll;
SetWindowsHookExWProc ProcSetWindowsHookExW;
hCoreDll = LoadLibrary(_T("coredll.dll"));
ProcSetWindowsHookExW = (SetWindowsHookExWProc)GetProcAddress(hCoreDll, _T("SetWindowsHookExW"));
FreeLibrary(hCoreDll);
}
调用
HHOOK glhHook = SetWindowsHookExWProc(WH_MOUSE, (int) MouseProc, glhInstance, 0);
可是总是编译出错
error C2564: 'struct HHOOK__ *(__cdecl *)(int,int,struct HINSTANCE__ *,unsigned long)' :
function-style conversion to builtin type takes only one argument
|
|