Files
vxunderground-VX-API/VX-API/GetSystemWindowsDirectory.cpp
T
vxunderground 86ca3658a5 update
2022-09-10 13:20:38 -05:00

27 lines
659 B
C++

#include "Win32Helper.h"
BOOL GetSystemWindowsDirectoryA(DWORD nBufferLength, PCHAR lpBuffer)
{
PKUSER_SHARED_DATA SharedData = GetKUserSharedData();
if (nBufferLength < StringLengthW(SharedData->NtSystemRoot))
return FALSE;
if (WCharStringToCharString(lpBuffer, SharedData->NtSystemRoot, nBufferLength) != 0)
return TRUE;
else
return FALSE;
}
BOOL GetSystemWindowsDirectoryW(DWORD nBufferLength, PWCHAR lpBuffer)
{
PKUSER_SHARED_DATA SharedData = GetKUserSharedData();
if (nBufferLength < StringLengthW(SharedData->NtSystemRoot))
return FALSE;
if (StringCopyW(lpBuffer, SharedData->NtSystemRoot) == NULL)
return FALSE;
return TRUE;
}