From b03dc5889782e1b698e4496b581df7537a611602 Mon Sep 17 00:00:00 2001 From: Lev Date: Wed, 15 Feb 2017 08:10:29 +0500 Subject: [PATCH] Fixed most of unrechable code. --- rehlds/engine/delta.cpp | 5 +--- rehlds/engine/delta_jit.cpp | 1 - rehlds/engine/net_chan.cpp | 2 +- rehlds/engine/pr_cmds.cpp | 17 ++++------- rehlds/engine/sv_main.cpp | 4 --- rehlds/hookers/hooker.cpp | 2 -- rehlds/hookers/memory.cpp | 6 +--- rehlds/testsuite/anonymizer.cpp | 53 ++++++++++++++++----------------- rehlds/testsuite/funccalls.cpp | 1 - rehlds/testsuite/player.cpp | 52 ++++++++++++++++---------------- rehlds/testsuite/testsuite.cpp | 10 +++---- 11 files changed, 64 insertions(+), 89 deletions(-) diff --git a/rehlds/engine/delta.cpp b/rehlds/engine/delta.cpp index 6b242e6..0d68d66 100644 --- a/rehlds/engine/delta.cpp +++ b/rehlds/engine/delta.cpp @@ -419,7 +419,7 @@ int DELTA_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields) delta_description_t *pTest; int fieldType; int fieldCount = pFields->fieldCount; - int length; + int length = 0; int different; int neededBits = 0; int highestBit = -1; @@ -1155,7 +1155,6 @@ qboolean DELTA_ParseType(delta_description_t *pdelta, char **pstream) // We are hit the end of the stream Sys_Error("%s: Expecting fieldtype info\n", __func__); // Was Con_Printf here - return FALSE; } qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link_t *pField, char **pstream) @@ -1216,7 +1215,6 @@ qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link if (Q_stricmp(com_token, ")")) { Sys_Error("%s: Expecting ), got %s\n", __func__, com_token); // Was Con_Printf here - return FALSE; } *pstream = COM_Parse(*pstream); @@ -1429,7 +1427,6 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream) if (Q_stricmp(com_token, "{")) { Sys_Error("%s: Expecting {, got %s\n", __func__, com_token); // Was Con_Printf here - return FALSE; } if (!DELTA_ParseOneField(&pstream, &links, count, pdefinition)) { diff --git a/rehlds/engine/delta_jit.cpp b/rehlds/engine/delta_jit.cpp index 658d790..3455820 100644 --- a/rehlds/engine/delta_jit.cpp +++ b/rehlds/engine/delta_jit.cpp @@ -31,7 +31,6 @@ unsigned int DELTAJIT_GetFieldSize(delta_description_t* desc) { default: Sys_Error("%s: Unknown delta field type %d", __func__, desc->fieldType); - return 0; } } diff --git a/rehlds/engine/net_chan.cpp b/rehlds/engine/net_chan.cpp index 90d0426..6ecfc95 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -1358,7 +1358,7 @@ int Netchan_CreateFileFragments_(qboolean server, netchan_t *chan, const char *f else { rehlds_syserror("%s: Reverse clientside code", __func__); - return 0; + //return 0; } } diff --git a/rehlds/engine/pr_cmds.cpp b/rehlds/engine/pr_cmds.cpp index 8ff8e5f..ae7e0a4 100644 --- a/rehlds/engine/pr_cmds.cpp +++ b/rehlds/engine/pr_cmds.cpp @@ -1053,20 +1053,15 @@ int EXT_FUNC PF_precache_sound_I(const char *s) "Reduce the number of brush models and/or regular models in the map to correct this.", __func__, s, MAX_SOUNDS); } - else - { - // precaching not enabled. check if already exists. - for (i = 0; i < MAX_SOUNDS; i++) - { - if (g_psv.sound_precache[i] && !Q_stricmp(g_psv.sound_precache[i], s)) - return i; - } - Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s); + // precaching not enabled. check if already exists. + for (i = 0; i < MAX_SOUNDS; i++) + { + if (g_psv.sound_precache[i] && !Q_stricmp(g_psv.sound_precache[i], s)) + return i; } - // unreach - return -1; + Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s); } unsigned short EXT_FUNC EV_Precache(int type, const char *psz) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 742998e..bb4a138 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -328,8 +328,6 @@ delta_t *SV_LookupDelta(char *name) } Sys_Error("%s: Couldn't find delta for %s\n", __func__, name); - - return NULL; } NOXREF void SV_DownloadingModules(void) @@ -2111,8 +2109,6 @@ int SV_CheckForDuplicateNames(char *userinfo, qboolean bIsReconnecting, int nExc val = Info_ValueForKey(userinfo, "name"); changed = TRUE; } - - return changed; } #ifdef REHLDS_FIXES diff --git a/rehlds/hookers/hooker.cpp b/rehlds/hookers/hooker.cpp index cb6908d..f4914af 100644 --- a/rehlds/hookers/hooker.cpp +++ b/rehlds/hookers/hooker.cpp @@ -45,7 +45,6 @@ void *GetOriginalFuncAddrOrDie(const char *funcName) } rehlds_syserror("%s: Could not find function '%s'", __func__, funcName); - return NULL; } void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def) @@ -68,7 +67,6 @@ void *GetFuncRefAddrOrDie(const char *funcName) } rehlds_syserror("%s: Could not find function '%s'", __func__, funcName); - return NULL; } void *GetFuncRefAddrOrDefault(const char *funcName, void *def) diff --git a/rehlds/hookers/memory.cpp b/rehlds/hookers/memory.cpp index d069c89..e0f37d8 100644 --- a/rehlds/hookers/memory.cpp +++ b/rehlds/hookers/memory.cpp @@ -417,31 +417,27 @@ size_t HIDDEN FindSymbol(Module *module, const char* symbolName, int index) #ifdef _WIN32 void ProcessModuleData(Module *module) { - int i = 0; PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base; if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) { rehlds_syserror("%s: Invalid DOS header signature", __func__); - return; } PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew); if (NTHeaders->Signature != 0x4550) { rehlds_syserror("%s: Invalid NT header signature", __func__); - return; } PIMAGE_SECTION_HEADER cSection = (PIMAGE_SECTION_HEADER)((size_t)(&NTHeaders->OptionalHeader) + NTHeaders->FileHeader.SizeOfOptionalHeader); PIMAGE_SECTION_HEADER CodeSection = NULL; - for (i = 0; i < NTHeaders->FileHeader.NumberOfSections; i++, cSection++) { + for (int i = 0; i < NTHeaders->FileHeader.NumberOfSections; i++, cSection++) { if (cSection->VirtualAddress == NTHeaders->OptionalHeader.BaseOfCode) CodeSection = cSection; } if (CodeSection == NULL) { rehlds_syserror("%s: Code section not found", __func__); - return; } module->codeSection.start = (uint32)module->base + CodeSection->VirtualAddress; diff --git a/rehlds/testsuite/anonymizer.cpp b/rehlds/testsuite/anonymizer.cpp index e59806d..669d0bd 100644 --- a/rehlds/testsuite/anonymizer.cpp +++ b/rehlds/testsuite/anonymizer.cpp @@ -44,13 +44,11 @@ void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data) { default: rehlds_syserror("%s: unsupported callback %u", __func__, m_iCallback); } - - return NULL; } void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data, bool bIOFailure, SteamAPICall_t hSteamAPICall) { rehlds_syserror("%s: not implemented", __func__); - return NULL; + //return NULL; } @@ -92,25 +90,25 @@ CSteamAppsAnonymizingWrapper::CSteamAppsAnonymizingWrapper(ISteamApps* original, bool CSteamAppsAnonymizingWrapper::BIsSubscribed() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsAnonymizingWrapper::BIsLowViolence() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsAnonymizingWrapper::BIsCybercafe() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsAnonymizingWrapper::BIsVACBanned() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } const char* CSteamAppsAnonymizingWrapper::GetCurrentGameLanguage() @@ -122,43 +120,43 @@ const char* CSteamAppsAnonymizingWrapper::GetCurrentGameLanguage() const char* CSteamAppsAnonymizingWrapper::GetAvailableGameLanguages() { rehlds_syserror("%s: not implemented", __func__); - return NULL; + //return NULL; } bool CSteamAppsAnonymizingWrapper::BIsSubscribedApp(AppId_t appID) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsAnonymizingWrapper::BIsDlcInstalled(AppId_t appID) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } uint32 CSteamAppsAnonymizingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID) { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } bool CSteamAppsAnonymizingWrapper::BIsSubscribedFromFreeWeekend() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } int CSteamAppsAnonymizingWrapper::GetDLCCount() { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } bool CSteamAppsAnonymizingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } void CSteamAppsAnonymizingWrapper::InstallDLC(AppId_t nAppID) @@ -179,25 +177,25 @@ void CSteamAppsAnonymizingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID) bool CSteamAppsAnonymizingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsAnonymizingWrapper::MarkContentCorrupt(bool bMissingFilesOnly) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } uint32 CSteamAppsAnonymizingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots) { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } uint32 CSteamAppsAnonymizingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize) { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } @@ -214,7 +212,7 @@ CSteamGameServerAnonymizingWrapper::CSteamGameServerAnonymizingWrapper(ISteamGam bool CSteamGameServerAnonymizingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } void CSteamGameServerAnonymizingWrapper::SetProduct(const char *pszProduct) @@ -370,13 +368,13 @@ bool CSteamGameServerAnonymizingWrapper::BUpdateUserData(CSteamID steamIDUser, c HAuthTicket CSteamGameServerAnonymizingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket) { rehlds_syserror("%s: not implemented", __func__); - return k_HAuthTicketInvalid; + //return k_HAuthTicketInvalid; } EBeginAuthSessionResult CSteamGameServerAnonymizingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID) { rehlds_syserror("%s: not implemented", __func__); - return k_EBeginAuthSessionResultInvalidTicket; + //return k_EBeginAuthSessionResultInvalidTicket; } void CSteamGameServerAnonymizingWrapper::EndAuthSession(CSteamID steamID) @@ -392,13 +390,13 @@ void CSteamGameServerAnonymizingWrapper::CancelAuthTicket(HAuthTicket hAuthTicke EUserHasLicenseForAppResult CSteamGameServerAnonymizingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID) { rehlds_syserror("%s: not implemented", __func__); - return k_EUserHasLicenseResultDoesNotHaveLicense; + //return k_EUserHasLicenseResultDoesNotHaveLicense; } bool CSteamGameServerAnonymizingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } void CSteamGameServerAnonymizingWrapper::GetGameplayStats() @@ -409,13 +407,13 @@ void CSteamGameServerAnonymizingWrapper::GetGameplayStats() SteamAPICall_t CSteamGameServerAnonymizingWrapper::GetServerReputation() { rehlds_syserror("%s: not implemented", __func__); - return k_uAPICallInvalid; + //return k_uAPICallInvalid; } uint32 CSteamGameServerAnonymizingWrapper::GetPublicIP() { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort) @@ -430,7 +428,6 @@ bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData, res = m_Wrapped->HandleIncomingPacket(pData, cbData, ntohl(realIp), srcPort); } - return res; } @@ -472,13 +469,13 @@ void CSteamGameServerAnonymizingWrapper::ForceHeartbeat() SteamAPICall_t CSteamGameServerAnonymizingWrapper::AssociateWithClan(CSteamID steamIDClan) { rehlds_syserror("%s: not implemented", __func__); - return k_uAPICallInvalid; + //return k_uAPICallInvalid; } SteamAPICall_t CSteamGameServerAnonymizingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) { rehlds_syserror("%s: not implemented", __func__); - return k_uAPICallInvalid; + //return k_uAPICallInvalid; } diff --git a/rehlds/testsuite/funccalls.cpp b/rehlds/testsuite/funccalls.cpp index 43904bc..1f01cf4 100644 --- a/rehlds/testsuite/funccalls.cpp +++ b/rehlds/testsuite/funccalls.cpp @@ -3287,6 +3287,5 @@ IEngExtCall* IEngExtCallFactory::createByOpcode(ExtCallFuncs opc, void* buf, int default: rehlds_syserror("%s: unknown funccall opcode %d", __func__, opc); - return NULL; } } diff --git a/rehlds/testsuite/player.cpp b/rehlds/testsuite/player.cpp index 8411772..2b62592 100644 --- a/rehlds/testsuite/player.cpp +++ b/rehlds/testsuite/player.cpp @@ -67,7 +67,6 @@ void* CPlayingEngExtInterceptor::allocFuncCall() } rehlds_syserror("%s: running out of free slots", __func__); - return NULL; } void CPlayingEngExtInterceptor::freeFuncCall(void* fcall) @@ -165,7 +164,6 @@ IEngExtCall* CPlayingEngExtInterceptor::getNextCall(bool peek, bool processCallb if (callback != NULL && callback->m_Start) { if (!processCallbacks) { rehlds_syserror("%s: read a callback, but it's not allowed here", __func__); - return NULL; } while (callback != NULL && callback->m_Start) { @@ -690,7 +688,7 @@ CSteamGameServerPlayingWrapper::CSteamGameServerPlayingWrapper(CPlayingEngExtInt bool CSteamGameServerPlayingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } void CSteamGameServerPlayingWrapper::SetProduct(const char *pszProduct) { @@ -901,12 +899,12 @@ bool CSteamGameServerPlayingWrapper::BUpdateUserData(CSteamID steamIDUser, const HAuthTicket CSteamGameServerPlayingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket) { rehlds_syserror("%s: not implemented", __func__); - return k_HAuthTicketInvalid; + //return k_HAuthTicketInvalid; } EBeginAuthSessionResult CSteamGameServerPlayingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID) { rehlds_syserror("%s: not implemented", __func__); - return k_EBeginAuthSessionResultInvalidTicket; + //return k_EBeginAuthSessionResultInvalidTicket; } void CSteamGameServerPlayingWrapper::EndAuthSession(CSteamID steamID) { @@ -919,12 +917,12 @@ void CSteamGameServerPlayingWrapper::CancelAuthTicket(HAuthTicket hAuthTicket) { EUserHasLicenseForAppResult CSteamGameServerPlayingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID) { rehlds_syserror("%s: not implemented", __func__); - return k_EUserHasLicenseResultHasLicense; + //return k_EUserHasLicenseResultHasLicense; } bool CSteamGameServerPlayingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } void CSteamGameServerPlayingWrapper::GetGameplayStats() { @@ -933,12 +931,12 @@ void CSteamGameServerPlayingWrapper::GetGameplayStats() { SteamAPICall_t CSteamGameServerPlayingWrapper::GetServerReputation() { rehlds_syserror("%s: not implemented", __func__); - return k_uAPICallInvalid; + //return k_uAPICallInvalid; } uint32 CSteamGameServerPlayingWrapper::GetPublicIP() { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } bool CSteamGameServerPlayingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort) { @@ -988,12 +986,12 @@ void CSteamGameServerPlayingWrapper::ForceHeartbeat() { SteamAPICall_t CSteamGameServerPlayingWrapper::AssociateWithClan(CSteamID steamIDClan) { rehlds_syserror("%s: not implemented", __func__); - return k_uAPICallInvalid; + //return k_uAPICallInvalid; } SteamAPICall_t CSteamGameServerPlayingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) { rehlds_syserror("%s: not implemented", __func__); - return k_uAPICallInvalid; + //return k_uAPICallInvalid; } @@ -1009,62 +1007,62 @@ CSteamAppsPlayingWrapper::CSteamAppsPlayingWrapper(CPlayingEngExtInterceptor* pl bool CSteamAppsPlayingWrapper::BIsSubscribed() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsPlayingWrapper::BIsLowViolence() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsPlayingWrapper::BIsCybercafe() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsPlayingWrapper::BIsVACBanned() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } const char* CSteamAppsPlayingWrapper::GetCurrentGameLanguage() { rehlds_syserror("%s: not implemented", __func__); - return ""; + //return ""; } const char* CSteamAppsPlayingWrapper::GetAvailableGameLanguages() { rehlds_syserror("%s: not implemented", __func__); - return ""; + //return ""; } bool CSteamAppsPlayingWrapper::BIsSubscribedApp(AppId_t appID) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsPlayingWrapper::BIsDlcInstalled(AppId_t appID) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } uint32 CSteamAppsPlayingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID) { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } bool CSteamAppsPlayingWrapper::BIsSubscribedFromFreeWeekend() { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } int CSteamAppsPlayingWrapper::GetDLCCount() { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } bool CSteamAppsPlayingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } void CSteamAppsPlayingWrapper::InstallDLC(AppId_t nAppID) { @@ -1081,20 +1079,20 @@ void CSteamAppsPlayingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID) { bool CSteamAppsPlayingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } bool CSteamAppsPlayingWrapper::MarkContentCorrupt(bool bMissingFilesOnly) { rehlds_syserror("%s: not implemented", __func__); - return false; + //return false; } uint32 CSteamAppsPlayingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots) { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } uint32 CSteamAppsPlayingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize) { rehlds_syserror("%s: not implemented", __func__); - return 0; + //return 0; } diff --git a/rehlds/testsuite/testsuite.cpp b/rehlds/testsuite/testsuite.cpp index 90c9b2b..0d3d6e7 100644 --- a/rehlds/testsuite/testsuite.cpp +++ b/rehlds/testsuite/testsuite.cpp @@ -2,7 +2,7 @@ /* ============================================================================ - external function hooks + external function hooks ============================================================================*/ uint32 __cdecl time_hooked(uint32* pTime) { @@ -145,13 +145,13 @@ bool __cdecl SteamAPI_Init_hooked() ISteamUser* __cdecl SteamUser_hooked() { rehlds_syserror("%s: not implemented", __func__); - return NULL; + //return NULL; } ISteamFriends* __cdecl SteamFriends_hooked() { rehlds_syserror("%s: not implemented", __func__); - return NULL; + //return NULL; } void __cdecl SteamGameServer_RunCallbacks_hooked() @@ -197,7 +197,7 @@ void __cdecl SteamAPI_RegisterCallResult_hooked(class CCallbackBase *pCallback, ISteamHTTP* __cdecl SteamHTTP_hooked() { rehlds_syserror("%s: not implemented", __func__); - return NULL; + //return NULL; } void __cdecl SteamAPI_UnregisterCallResult_hooked(class CCallbackBase *pCallback, SteamAPICall_t hAPICall) @@ -216,7 +216,7 @@ void __cdecl SteamAPI_UseBreakpadCrashHandler_hooked(char const *pchVersion, cha } /* ============================================================================ - Hooks installation + Hooks installation ============================================================================*/ HMODULE getModuleHandleOrDie(const char* moduleName) { HMODULE res = GetModuleHandleA(moduleName);