2018-08-23 23:53:23 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// vnrhook/const.h
|
|
|
|
// 8/23/2013 jichi
|
|
|
|
// Branch: ITH/common.h, rev 128
|
|
|
|
|
2018-12-03 04:30:35 +08:00
|
|
|
enum { MESSAGE_SIZE = 500, PIPE_BUFFER_SIZE = 2000, SHIFT_JIS = 932, MAX_MODULE_SIZE = 120, HOOK_NAME_SIZE = 30 };
|
2018-08-23 23:53:23 +08:00
|
|
|
|
2018-12-31 11:11:23 +08:00
|
|
|
enum HostCommandType
|
2018-08-23 23:53:23 +08:00
|
|
|
{
|
|
|
|
HOST_COMMAND = -1, // null type
|
|
|
|
HOST_COMMAND_NEW_HOOK = 0,
|
|
|
|
HOST_COMMAND_REMOVE_HOOK = 1,
|
|
|
|
HOST_COMMAND_MODIFY_HOOK = 2,
|
|
|
|
HOST_COMMAND_HIJACK_PROCESS = 3,
|
|
|
|
HOST_COMMAND_DETACH = 4
|
|
|
|
};
|
|
|
|
|
2018-12-31 11:11:23 +08:00
|
|
|
enum HostNotificationType
|
2018-08-23 23:53:23 +08:00
|
|
|
{
|
|
|
|
HOST_NOTIFICATION = -1, // null type
|
|
|
|
HOST_NOTIFICATION_TEXT = 0,
|
|
|
|
HOST_NOTIFICATION_NEWHOOK = 1,
|
|
|
|
HOST_NOTIFICATION_RMVHOOK = 2
|
|
|
|
};
|
|
|
|
|
2018-12-31 11:11:23 +08:00
|
|
|
enum HookParamType : unsigned long
|
2018-08-23 23:53:23 +08:00
|
|
|
{
|
|
|
|
USING_STRING = 0x1, // type(data) is char* or wchar_t* and has length
|
|
|
|
USING_UNICODE = 0x2, // type(data) is wchar_t or wchar_t*
|
|
|
|
BIG_ENDIAN = 0x4, // type(data) is char
|
|
|
|
DATA_INDIRECT = 0x8,
|
|
|
|
USING_SPLIT = 0x10, // aware of split time?
|
|
|
|
SPLIT_INDIRECT = 0x20,
|
2018-10-12 00:58:30 +08:00
|
|
|
MODULE_OFFSET = 0x40, // address is relative to module
|
2019-01-04 06:52:16 +08:00
|
|
|
FUNCTION_OFFSET = 0x80, // address is relative to function
|
2018-08-23 23:53:23 +08:00
|
|
|
USING_UTF8 = 0x100,
|
2019-01-04 06:52:16 +08:00
|
|
|
READ_SEARCH = 0x200, // unspecified address: search for text instead
|
2018-08-23 23:53:23 +08:00
|
|
|
NO_CONTEXT = 0x400,
|
|
|
|
HOOK_EMPTY = 0x800,
|
|
|
|
FIXING_SPLIT = 0x1000,
|
|
|
|
DIRECT_READ = 0x2000, // /R read code instead of classic /H hook code
|
|
|
|
HOOK_ENGINE = 0x4000,
|
|
|
|
HOOK_ADDITIONAL = 0x8000
|
|
|
|
};
|
|
|
|
|
|
|
|
enum { FIXED_SPLIT_VALUE = 0x10001 }; // 6/1/2014: Fixed split value for hok parameter. Fuse all threads, and prevent floating
|