#ifndef __HOOKING_H__ #define __HOOKING_H__ typedef struct SERVICE_DESCRIPTOR_ENTRY { unsigned int *ServiceTableBase; unsigned int *ServiceCounterTableBase; unsigned int NumberOfServices; unsigned char *ParamTableBase; } SERVICE_DESCRIPTOR_ENTRY,*PSERVICE_DESCRIPTOR_ENTRY; //this works only for original unpatched functions #define SYSTEM_SERVICE(p) KeServiceDescriptorTable.ServiceTableBase[*(PULONG)((ULONG)p+1)] extern int hook_active; int hooking_hook(void); int hooking_unhook(void); #endif