Ring0.h
资源名称:HookAPI [点击查看]
上传用户:nbcables
上传日期:2007-01-11
资源大小:1243k
文件大小:1k
源码类别:
钩子与API截获
开发平台:
Visual C++
- #ifndef RING0_H
- #define RING0_H
- #pragma pack(1)
- struct GDT_DESCRIPTOR
- {
- WORD Limit_0_15;
- WORD Base_0_15;
- BYTE Base_16_23;
- BYTE Type : 4;
- BYTE System : 1;
- BYTE DPL : 2;
- BYTE Present : 1;
- BYTE Limit_16_19 : 4;
- BYTE Available : 1;
- BYTE Reserved : 1;
- BYTE D_B : 1;
- BYTE Granularity : 1;
- BYTE Base_24_31;
- };
- struct CALLGATE_DESCRIPTOR
- {
- WORD Offset_0_15;
- WORD Selector;
- WORD ParamCount : 5;
- WORD Unused : 3;
- WORD Type : 4;
- WORD System : 1;
- WORD DPL : 2;
- WORD Present : 1;
- WORD Offset_16_31;
- };
- struct GDTR
- {
- WORD wGDTLimit;
- DWORD dwGDTBase;
- };
- BOOL SetPageProtection(PVOID pvAddr);
- BOOL RemovePageProtection(PVOID pvAddr);
- #pragma pack()
- #endif