mirror of https://github.com/vxunderground/VX-API
20 lines
489 B
C++
20 lines
489 B
C++
#include "StringManipulation.h"
|
|
|
|
VOID RtlInitUnicodeString(_Inout_ PUNICODE_STRING DestinationString, _In_ PCWSTR SourceString)
|
|
{
|
|
SIZE_T DestSize;
|
|
|
|
if (SourceString)
|
|
{
|
|
DestSize = StringLengthW(SourceString) * sizeof(WCHAR);
|
|
DestinationString->Length = (USHORT)DestSize;
|
|
DestinationString->MaximumLength = (USHORT)DestSize + sizeof(WCHAR);
|
|
}
|
|
else
|
|
{
|
|
DestinationString->Length = 0;
|
|
DestinationString->MaximumLength = 0;
|
|
}
|
|
|
|
DestinationString->Buffer = (PWCHAR)SourceString;
|
|
} |