2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: GDI Driver Device Functions
5 * FILE: subsys/win32k/eng/device.c
6 * PROGRAMER: Jason Filby
11 #include <ddk/ntddk.h>
13 DWORD APIENTRY
EngDeviceIoControl(
15 DWORD dwIoControlCode
,
20 DWORD
*lpBytesReturned
)
26 PDEVICE_OBJECT theDevice
;
28 ObReferenceObjectByHandle(hDevice
, GENERIC_ALL
, NULL
, UserMode
,
29 (PVOID
*)&theDevice
, NULL
);
31 KeInitializeEvent(&Event
, SynchronizationEvent
, FALSE
);
33 Irp
= IoBuildDeviceIoControlRequest(dwIoControlCode
,
43 Status
= IoCallDriver(theDevice
, Irp
);
45 if (Status
== STATUS_PENDING
)
47 (void) KeWaitForSingleObject(&Event
, Executive
, KernelMode
, TRUE
, 0);