mirror of
https://github.com/vxunderground/VX-API
synced 2024-06-20 22:08:32 +00:00
Create RfGetSystemWindowsDirectory.cpp
This commit is contained in:
parent
b1b24fa209
commit
4c32680719
25
Windows API/RfGetSystemWindowsDirectory.cpp
Normal file
25
Windows API/RfGetSystemWindowsDirectory.cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
BOOL RfGetSystemWindowsDirectoryA(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 RfGetSystemWindowsDirectoryW(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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user