MCPcopy Create free account
hub / github.com/Meowmycks/LetMeowIn / RtlInitUnicodeString

Function RtlInitUnicodeString

src/main.cpp:81–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString) {
82 if (SourceString == nullptr) {
83 DestinationString->Length = 0;
84 DestinationString->MaximumLength = 0;
85 DestinationString->Buffer = nullptr;
86 }
87 else {
88 size_t size = wcslen(SourceString) * sizeof(WCHAR);
89 DestinationString->Length = static_cast<USHORT>(size);
90 DestinationString->MaximumLength = static_cast<USHORT>(size + sizeof(WCHAR));
91 DestinationString->Buffer = const_cast<PWSTR>(SourceString);
92 }
93}
94
95void InitializeObjectAttributes(
96 POBJECT_ATTRIBUTES p,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected