small cleanup

This commit is contained in:
Akash Mozumdar 2018-12-30 22:11:23 -05:00
parent b87b4c0b41
commit 9216548848
2 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
enum { MESSAGE_SIZE = 500, PIPE_BUFFER_SIZE = 2000, SHIFT_JIS = 932, MAX_MODULE_SIZE = 120, HOOK_NAME_SIZE = 30 }; enum { MESSAGE_SIZE = 500, PIPE_BUFFER_SIZE = 2000, SHIFT_JIS = 932, MAX_MODULE_SIZE = 120, HOOK_NAME_SIZE = 30 };
enum HostCommandType enum HostCommandType
{ {
HOST_COMMAND = -1, // null type HOST_COMMAND = -1, // null type
HOST_COMMAND_NEW_HOOK = 0, HOST_COMMAND_NEW_HOOK = 0,
@ -16,7 +16,7 @@ enum HostCommandType
HOST_COMMAND_DETACH = 4 HOST_COMMAND_DETACH = 4
}; };
enum HostNotificationType enum HostNotificationType
{ {
HOST_NOTIFICATION = -1, // null type HOST_NOTIFICATION = -1, // null type
HOST_NOTIFICATION_TEXT = 0, HOST_NOTIFICATION_TEXT = 0,
@ -24,7 +24,7 @@ enum HostNotificationType
HOST_NOTIFICATION_RMVHOOK = 2 HOST_NOTIFICATION_RMVHOOK = 2
}; };
enum HookParamType : unsigned long enum HookParamType : unsigned long
{ {
USING_STRING = 0x1, // type(data) is char* or wchar_t* and has length USING_STRING = 0x1, // type(data) is char* or wchar_t* and has length
USING_UNICODE = 0x2, // type(data) is wchar_t or wchar_t* USING_UNICODE = 0x2, // type(data) is wchar_t or wchar_t*

View File

@ -42,7 +42,7 @@ private:
}; };
// jichi 3/7/2014: Add guessed comment // jichi 3/7/2014: Add guessed comment
struct HookParam struct HookParam
{ {
// jichi 8/24/2013: For special hooks. // jichi 8/24/2013: For special hooks.
typedef void(*text_fun_t)(DWORD esp, HookParam *hp, BYTE index, DWORD *data, DWORD *split, DWORD *len); typedef void(*text_fun_t)(DWORD esp, HookParam *hp, BYTE index, DWORD *data, DWORD *split, DWORD *len);
@ -92,14 +92,14 @@ private:
struct InsertHookCmd // From host struct InsertHookCmd // From host
{ {
InsertHookCmd(HookParam hp) : hp(hp) {}; InsertHookCmd(HookParam hp) : hp(hp) {}
int command = HOST_COMMAND_NEW_HOOK; int command = HOST_COMMAND_NEW_HOOK;
HookParam hp; HookParam hp;
}; };
struct ConsoleOutputNotif // From hook struct ConsoleOutputNotif // From hook
{ {
ConsoleOutputNotif(std::string message = "") { strcpy_s<MESSAGE_SIZE>(this->message, message.c_str()); }; ConsoleOutputNotif(std::string message = "") { strcpy_s<MESSAGE_SIZE>(this->message, message.c_str()); }
int command = HOST_NOTIFICATION_TEXT; int command = HOST_NOTIFICATION_TEXT;
char message[MESSAGE_SIZE] = {}; char message[MESSAGE_SIZE] = {};
}; };