IoCreateDevice总是失败??
各位大虾请看
UNICODE_STRING ntDeviceName;
UNICODE_STRING win32DeviceName;
RtlInitUnicodeString(&ntDeviceName, L"\\Device\\Twdm1");
RtlInitUnicodeString(&win32DeviceName, L"\\DosDevices\\Twdm1");
status = IoCreateDevice(
DriverObject,
sizeof(DEVICE_EXTENSION),
&ntDeviceName,
FILE_DEVICE_UNKNOWN,
0,
FALSE,
&fdo);
if (!NT_SUCCESS(status))
return status;
为何在这返回?
小妹求救!!
各位大虾请看
UNICODE_STRING ntDeviceName;
UNICODE_STRING win32DeviceName;
RtlInitUnicodeString(&ntDeviceName, L"\\Device\\Twdm1");
RtlInitUnicodeString(&win32DeviceName, L"\\DosDevices\\Twdm1");
status = IoCreateDevice(
DriverObject,
sizeof(DEVICE_EXTENSION),
&ntDeviceName,
FILE_DEVICE_UNKNOWN,
0,
FALSE,
&fdo);
if (!NT_SUCCESS(status))
return status;
为何在这返回?
小妹求救!!
DriverObject,
sizeof(DEVICE_EXTENSION),
&ntDeviceName,
FILE_DEVICE_UNKNOWN,
0, ===> FILE_DEVICE_SECURE_OPEN 你为什么要用0呢?
FALSE,
&fdo); 先改上面的,不行的话 输出状态码看看.居然是0分贴... -_-
{ return status;
}