你好像没有导出符号连接名啊:
UNICODE_STRING deviceNameUnicodeString;
RtlInitUnicodeString(&deviceNameUnicodeString, NT_DEVICE_NAME);
NTSTATUS status = STATUS_SUCCESS;
status = IoCreateDevice(DriverObject, sizeof(DEVICE_EXTENSION),
&deviceNameUnicodeString,FILE_DEVICE_UNKNOWN,
0, false, &FunctionDevice);
if (!NT_SUCCESS(status))
{
DT("%s IoCreateDevice VMouse failed", FUN);
return status;
}
UNICODE_STRING deviceLinkUnicodeString;
RtlInitUnicodeString(&deviceLinkUnicodeString, DOS_DEVICE_NAME);
status = IoCreateSymbolicLink(&deviceLinkUnicodeString, &deviceNameUnicodeString);
if (!NT_SUCCESS(status))
{
DT("%s IoCreateSymbolicLink VMouse failed", FUN);
if (FunctionDevice)
{
IoDeleteDevice(FunctionDevice);
return status;
}
} |