阅读:2650回复:1
RTL_CONSTANT_STRING 无法编译通过
#include<ntddk.h>
#include<ntdef.h> VOID DriverUnload(PDRIVER_OBJECT driver) { DbgPrint("The DriverUnload!\r\n"); } NTSTATUS DriverEntry(PDRIVER_OBJECT driver,PUNICODE_STRING reg_path) { /* #if DBG _asm int 3 #endif */ UNICODE_STRING str; str = RTL_CONSTANT_STRING(L"This is a Unicode String"); /*这里编译时报错:(>e:\vista_myprograme\驱动学习\emptydriver1\emptydriver1\test.c(16) : error C2059: syntax error : '{') 搞不清楚哪里有问题 请高手指点 */ RtlInitUnicodeString(&str,L"This is a Unicode string !"); DbgPrint("The Driver is Load!"); DbgPrint("We will print a String:\n"); DbgPrint("%wZ",&str); driver->DriverUnload=DriverUnload; return STATUS_SUCCESS; } |
|
沙发#
发布于:2010-04-12 21:10
没有人遇到过么?
|
|