BOOL mdnHook(HWND hWnd, u_int wMsg, char FAR *buf, CONVPTR pConv) { if (hookHandle == NULL) { hookHandle = SetWindowsHookEx(WH_GETMESSAGE, hookProc, NULL, GetCurrentThreadId()) ; } if (hookHandle == NULL) { mdnPrintf("mdnHook: cannot set hook\n") ; return FALSE ; } if (hookListAppend(hWnd, wMsg, buf, pConv) != TRUE) { return FALSE ; } return TRUE ; }
/* * idnHook - hook async. completion message */ BOOL idnHook(HWND hWnd, u_int wMsg, char FAR *buf, idn_resconf_t ctx) { if (hookHandle == NULL) { hookHandle = SetWindowsHookEx(WH_GETMESSAGE, hookProc, NULL, GetCurrentThreadId()); } if (hookHandle == NULL) { idnPrintf("idnHook: cannot set hook\n"); return (FALSE); } if (hookListAppend(hWnd, wMsg, buf, ctx) != TRUE) { return (FALSE); } return (TRUE); }