mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
log SetWindowsHookExA hook types
This commit is contained in:
parent
6a22fcf142
commit
e6c9eea473
@ -28,6 +28,7 @@ void dbg_dump_dds_flags(DWORD flags);
|
|||||||
void dbg_dump_dds_blt_fast_flags(DWORD flags);
|
void dbg_dump_dds_blt_fast_flags(DWORD flags);
|
||||||
void dbg_dump_dds_lock_flags(DWORD flags);
|
void dbg_dump_dds_lock_flags(DWORD flags);
|
||||||
void dbg_dump_di_scm_flags(DWORD flags);
|
void dbg_dump_di_scm_flags(DWORD flags);
|
||||||
|
void dbg_dump_hook_type(int idHook);
|
||||||
char* dbg_d3d9_hr_to_str(HRESULT hr);
|
char* dbg_d3d9_hr_to_str(HRESULT hr);
|
||||||
char* dbg_mes_to_str(int id);
|
char* dbg_mes_to_str(int id);
|
||||||
void __cdecl dbg_invoke_watson(wchar_t const*, wchar_t const*, wchar_t const*, unsigned int, uintptr_t);
|
void __cdecl dbg_invoke_watson(wchar_t const*, wchar_t const*, wchar_t const*, unsigned int, uintptr_t);
|
||||||
|
51
src/debug.c
51
src/debug.c
@ -1114,6 +1114,57 @@ void dbg_dump_di_scm_flags(DWORD flags)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dbg_dump_hook_type(int idHook)
|
||||||
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if (idHook == 0) {
|
||||||
|
TRACE(" WH_JOURNALRECORD\n");
|
||||||
|
}
|
||||||
|
if (idHook == 1) {
|
||||||
|
TRACE(" WH_JOURNALPLAYBACK\n");
|
||||||
|
}
|
||||||
|
if (idHook == 2) {
|
||||||
|
TRACE(" WH_KEYBOARD\n");
|
||||||
|
}
|
||||||
|
if (idHook == 3) {
|
||||||
|
TRACE(" WH_GETMESSAGE\n");
|
||||||
|
}
|
||||||
|
if (idHook == 4) {
|
||||||
|
TRACE(" WH_CALLWNDPROC\n");
|
||||||
|
}
|
||||||
|
if (idHook == 5) {
|
||||||
|
TRACE(" WH_CBT\n");
|
||||||
|
}
|
||||||
|
if (idHook == 6) {
|
||||||
|
TRACE(" WH_SYSMSGFILTER\n");
|
||||||
|
}
|
||||||
|
if (idHook == 7) {
|
||||||
|
TRACE(" WH_MOUSE\n");
|
||||||
|
}
|
||||||
|
if (idHook == 9) {
|
||||||
|
TRACE(" WH_DEBUG\n");
|
||||||
|
}
|
||||||
|
if (idHook == 10) {
|
||||||
|
TRACE(" WH_SHELL\n");
|
||||||
|
}
|
||||||
|
if (idHook == 11) {
|
||||||
|
TRACE(" WH_FOREGROUNDIDLE\n");
|
||||||
|
}
|
||||||
|
if (idHook == 12) {
|
||||||
|
TRACE(" WH_CALLWNDPROCRET\n");
|
||||||
|
}
|
||||||
|
if (idHook == 13) {
|
||||||
|
TRACE(" WH_KEYBOARD_LL\n");
|
||||||
|
}
|
||||||
|
if (idHook == 14) {
|
||||||
|
TRACE(" WH_MOUSE_LL\n");
|
||||||
|
}
|
||||||
|
if (idHook == -1) {
|
||||||
|
TRACE(" WH_MSGFILTER\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
char* dbg_d3d9_hr_to_str(HRESULT hr)
|
char* dbg_d3d9_hr_to_str(HRESULT hr)
|
||||||
{
|
{
|
||||||
#define HR_TO_STR(x) if (x == hr) return #x
|
#define HR_TO_STR(x) if (x == hr) return #x
|
||||||
|
@ -591,6 +591,8 @@ HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, D
|
|||||||
dwThreadId,
|
dwThreadId,
|
||||||
_ReturnAddress());
|
_ReturnAddress());
|
||||||
|
|
||||||
|
dbg_dump_hook_type(idHook);
|
||||||
|
|
||||||
if (idHook == WH_KEYBOARD_LL && hmod && GetModuleHandle("AcGenral") == hmod)
|
if (idHook == WH_KEYBOARD_LL && hmod && GetModuleHandle("AcGenral") == hmod)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user