I have a const string - "testfilename.sys", and I want to create a PUNICODE_STRING that will hold it.
How can I do that?
As @David Heffernan pointed out, RtlInitUnicodeString is the way to create UNICODE_STRING structures.
In your case:
#include <Winternl.h>
[...]
UNICODE_STRING myUnicodeStr;
RtlInitUnicodeString(&myUnicodeStr, L"testfilename.sys");
A PUNICODE_STRING is just UNICODE_STRING*.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With