Code formatting

This commit is contained in:
Duncan Ogilvie 2026-04-13 11:41:19 +02:00
parent 7a114df3d5
commit ec7a8b9352
4 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ static bool isAtleastVista()
return isAtleastVista; return isAtleastVista;
RTL_OSVERSIONINFOW versionInfo = {0}; RTL_OSVERSIONINFOW versionInfo = {0};
versionInfo.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOW); versionInfo.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOW);
typedef NTSTATUS (WINAPI* tRtlGetVersion)(PRTL_OSVERSIONINFOW); typedef NTSTATUS(WINAPI * tRtlGetVersion)(PRTL_OSVERSIONINFOW);
tRtlGetVersion pRtlGetVersion = (tRtlGetVersion)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlGetVersion"); tRtlGetVersion pRtlGetVersion = (tRtlGetVersion)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlGetVersion");
if(!pRtlGetVersion || !NT_SUCCESS(pRtlGetVersion(&versionInfo))) if(!pRtlGetVersion || !NT_SUCCESS(pRtlGetVersion(&versionInfo)))
{ {

View File

@ -502,9 +502,9 @@ __declspec(dllexport) void* TITCALL InitNativeDebugW(wchar_t* szFileName, wchar_
NumAttributes = 3; NumAttributes = 3;
AttributesSize = sizeof(SIZE_T) + NumAttributes * sizeof(PS_ATTRIBUTE); AttributesSize = sizeof(SIZE_T) + NumAttributes * sizeof(PS_ATTRIBUTE);
AttributeList = reinterpret_cast<PPS_ATTRIBUTE_LIST>( AttributeList = reinterpret_cast<PPS_ATTRIBUTE_LIST>(
RtlAllocateHeap(RtlProcessHeap(), RtlAllocateHeap(RtlProcessHeap(),
HEAP_ZERO_MEMORY, // Not optional HEAP_ZERO_MEMORY, // Not optional
AttributesSize)); AttributesSize));
AttributeList->TotalLength = AttributesSize; AttributeList->TotalLength = AttributesSize;
// In: NT style absolute image path. This is the only required attribute // In: NT style absolute image path. This is the only required attribute

View File

@ -90,7 +90,7 @@ __declspec(dllexport) bool TITCALL StaticFileUnloadW(wchar_t* szFileName, bool C
if(FileHandle != NULL && FileMap != NULL) if(FileHandle != NULL && FileMap != NULL)
{ {
// HACK: compatibility with x64dbg // HACK: compatibility with x64dbg
if(FileHandle != (HANDLE)-1) if(FileHandle != (HANDLE) - 1)
{ {
UnMapFileEx(FileHandle, LoadedSize, FileMap, FileMapVA); UnMapFileEx(FileHandle, LoadedSize, FileMap, FileMapVA);
} }

View File

@ -9,7 +9,7 @@ bool SystemInformation::getSystemInformation()
osvi.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOW); osvi.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOW);
SYSTEM_INFO si = {0}; SYSTEM_INFO si = {0};
def_GetNativeSystemInfo _GetNativeSystemInfo = 0; def_GetNativeSystemInfo _GetNativeSystemInfo = 0;
typedef LONG (WINAPI* tRtlGetVersion)(PRTL_OSVERSIONINFOW); typedef LONG(WINAPI * tRtlGetVersion)(PRTL_OSVERSIONINFOW);
tRtlGetVersion pRtlGetVersion = (tRtlGetVersion)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlGetVersion"); tRtlGetVersion pRtlGetVersion = (tRtlGetVersion)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlGetVersion");
if(!pRtlGetVersion) if(!pRtlGetVersion)
return false; return false;