mirror of
https://github.com/reactos/reactos.git
synced 2024-10-08 02:13:56 +00:00
- check if IoCreateDevice succeeded...
svn path=/trunk/; revision=25252
This commit is contained in:
parent
39436f3008
commit
e415b04c90
|
@ -801,6 +801,7 @@ NTSTATUS STDCALL
|
||||||
DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||||
{
|
{
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
|
NTSTATUS Status;
|
||||||
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BlueScreen");
|
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BlueScreen");
|
||||||
UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\BlueScreen");
|
UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\BlueScreen");
|
||||||
|
|
||||||
|
@ -812,13 +813,18 @@ DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||||
DriverObject->MajorFunction[IRP_MJ_WRITE] = ScrWrite;
|
DriverObject->MajorFunction[IRP_MJ_WRITE] = ScrWrite;
|
||||||
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL ] = ScrIoControl;
|
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL ] = ScrIoControl;
|
||||||
|
|
||||||
IoCreateDevice (DriverObject,
|
Status = IoCreateDevice (DriverObject,
|
||||||
sizeof(DEVICE_EXTENSION),
|
sizeof(DEVICE_EXTENSION),
|
||||||
&DeviceName,
|
&DeviceName,
|
||||||
FILE_DEVICE_SCREEN,
|
FILE_DEVICE_SCREEN,
|
||||||
0,
|
0,
|
||||||
TRUE,
|
TRUE,
|
||||||
&DeviceObject);
|
&DeviceObject);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
IoCreateSymbolicLink (&SymlinkName, &DeviceName);
|
IoCreateSymbolicLink (&SymlinkName, &DeviceName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue