UNICODE_STRING str = {0};
wchar_t strInfo[] = {L"马上就是光棍节了"};
str.Buffer = (PWCHAR)ExAllocatePoolWithTag(NonPagedPool, ArrayLength, 'MY');
str.Length = str.MaximumLength = (USHORT)wcslen(strInfo);
RtlStringCbPrintfW(str.Buffer, ArrayLength, L"%ws", strInfo);
KdPrint(("%ws\n", str.Buffer));
ExFreePool(str.Buffer);
str.Buffer = NULL;
str.Length = str.MaximumLength = 0;
windows driver 分配内存
最新推荐文章于 2023-03-11 17:09:44 发布