|
|
|
@ -794,31 +794,9 @@ typedef struct _MonitorOverrideData |
|
|
|
|
|
|
|
|
|
|
|
BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod); |
|
|
|
BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod); |
|
|
|
|
|
|
|
|
|
|
|
inline BOOL MaskCompare(PVOID pBuffer, LPCSTR lpPattern, LPCSTR lpMask) |
|
|
|
#ifdef _WIN64 |
|
|
|
{ |
|
|
|
PVOID FindPattern(PVOID pBase, SIZE_T dwSize, LPCSTR lpPattern, LPCSTR lpMask); |
|
|
|
for (PBYTE value = (PBYTE)pBuffer; *lpMask; ++lpPattern, ++lpMask, ++value) |
|
|
|
#endif |
|
|
|
{ |
|
|
|
|
|
|
|
if (*lpMask == 'x' && *(LPCBYTE)lpPattern != *value) |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline PVOID FindPattern(PVOID pBase, SIZE_T dwSize, LPCSTR lpPattern, LPCSTR lpMask) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
dwSize -= strlen(lpMask); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (SIZE_T index = 0; index < dwSize; ++index) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
PBYTE pAddress = (PBYTE)pBase + index; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (MaskCompare(pAddress, lpPattern, lpMask)) |
|
|
|
|
|
|
|
return pAddress; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline HMODULE LoadGuiModule() |
|
|
|
inline HMODULE LoadGuiModule() |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -828,8 +806,9 @@ inline HMODULE LoadGuiModule() |
|
|
|
wcscat_s(epGuiPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll"); |
|
|
|
wcscat_s(epGuiPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll"); |
|
|
|
return LoadLibraryExW(epGuiPath, NULL, LOAD_LIBRARY_AS_DATAFILE); |
|
|
|
return LoadLibraryExW(epGuiPath, NULL, LOAD_LIBRARY_AS_DATAFILE); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
#ifdef __cplusplus |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|