RtlInitUnicodeString 第二个参数可以用变量来表示吗?解决思路
RtlInitUnicodeString 第二个参数可以用变量来表示吗?
RtlInitUnicodeString(&devName,L"ZwOpenProcess");
就是把"ZwOpenProcess"用一个变量表代替,用变量后 L 这个还需要吗?
能以这个例子写个代码看看吗
------解决方案--------------------
可以,L表示这个字符串是Unicode编码。不过第二个参数是PCWSTR 类型的,因此必须是const 的
如可以这样定义 WCHAR* szDevName = L"ZwOpenProcess";
RtlInitUnicodeString(&devName,szDevName);
RtlInitUnicodeString(&devName,L"ZwOpenProcess");
就是把"ZwOpenProcess"用一个变量表代替,用变量后 L 这个还需要吗?
能以这个例子写个代码看看吗
------解决方案--------------------
可以,L表示这个字符串是Unicode编码。不过第二个参数是PCWSTR 类型的,因此必须是const 的
如可以这样定义 WCHAR* szDevName = L"ZwOpenProcess";
RtlInitUnicodeString(&devName,szDevName);