ReactOS  0.4.14-dev-608-gd495a4f
driver.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel Streaming
4  * FILE: drivers/wdm/audio/legacy/stream/driver.c
5  * PURPOSE: WDM Codec Class Driver
6  * PROGRAMMER: Johannes Anderwald
7  */
8 
9 #include "stream.h"
10 
12 NTAPI
16 {
17  PSTREAM_CLASS_DRIVER_EXTENSION DriverObjectExtension;
19  PSTREAM_DEVICE_EXTENSION DeviceExtension;
20  PKSOBJECT_CREATE_ITEM ItemList;
22 
23  /* Fetch driver object extension */
25  if (!DriverObjectExtension)
26  {
27  /* Failed to get driver extension */
29  }
30  /* Allocate Create Item */
31  ItemList = ExAllocatePool(NonPagedPool, sizeof(KSOBJECT_CREATE_ITEM));
32  if (!ItemList)
33  {
34  /* Failed to allocated Create Item */
36  }
37 
38  /* Create the FDO */
40  if (!NT_SUCCESS(Status))
41  {
42  /* Failed to create the FDO */
43  ExFreePool(ItemList);
44  return Status;
45  }
46 
47  /* Attach to device stack */
49  if (!LowerDeviceObject)
50  {
51  /* Failed to attach */
53  ExFreePool(ItemList);
54  return STATUS_UNSUCCESSFUL;
55  }
56 
57  /* Zero Create item */
58  RtlZeroMemory(ItemList, sizeof(KSOBJECT_CREATE_ITEM));
59  /* Setup object class */
60  RtlInitUnicodeString(&ItemList->ObjectClass, L"GLOBAL");
61  /* Setup CreateDispatch routine */
62  ItemList->Create = StreamClassCreateFilter;
63 
64  /* Get device extension */
66  /* Zero device extension */
67  RtlZeroMemory(DeviceExtension, sizeof(STREAM_DEVICE_EXTENSION));
68  /* Initialize Ks streaming */
69  Status = KsAllocateDeviceHeader(&DeviceExtension->Header, 1, ItemList);
70  if (!NT_SUCCESS(Status))
71  {
72  /* Cleanup resources */
75  ExFreePool(ItemList);
76  return Status;
77  }
78 
79  /* Store lower device object */
80  DeviceExtension->LowerDeviceObject = LowerDeviceObject;
81 
82  /* Store physical device object */
83  DeviceExtension->PhysicalDeviceObject = PhysicalDeviceObject;
84  /* Store driver object extension */
85  DeviceExtension->DriverExtension = DriverObjectExtension;
86  /* Initialize memory list */
87  InitializeListHead(&DeviceExtension->MemoryResourceList);
88  /* Setup device extension */
89  DeviceExtension->DeviceExtension = (PVOID) (DeviceExtension + 1);
90  /* Init interrupt dpc */
91  KeInitializeDpc(&DeviceExtension->InterruptDpc, StreamClassInterruptDpc, (PVOID)DeviceExtension);
92 
93  /* Set device transfer method */
95  /* Clear init flag */
97 
98  return Status;
99 }
100 
101 /*
102  *@implemented
103  */
104 NTSTATUS
105 STREAMAPI
110 {
112  PSTREAM_CLASS_DRIVER_EXTENSION DriverObjectExtension;
114 
115  /* Allocate driver extension */
117  if (!NT_SUCCESS(Status))
118  {
119  /* Failed to allocate */
121  }
122 
123  /* Zero driver object extension */
124  RtlZeroMemory(DriverObjectExtension, sizeof(STREAM_CLASS_DRIVER_EXTENSION));
125 
126  /* copy HwInitializationData */
127  RtlCopyMemory(&DriverObjectExtension->Data, HwInitializationData, sizeof(HW_INITIALIZATION_DATA));
128 
129  /* Setup device init methods */
132 
133  /* Setup irp handlers */
140 
141  /* Let Ks handle these */
144 
145  return STATUS_SUCCESS;
146 }
147 
148 /*
149  *@implemented
150  */
151 
152 VOID
153 NTAPI
155  IN PVOID HwDeviceExtension,
156  IN ULONG StreamDescriptorSize)
157 {
158  HW_STREAM_REQUEST_BLOCK_EXT RequestBlock;
159  PSTREAM_DEVICE_EXTENSION DeviceExtension;
160  PHW_STREAM_DESCRIPTOR StreamDescriptor;
161 
162  if (!HwDeviceExtension || !StreamDescriptorSize)
163  return;
164 
165  StreamDescriptor = ExAllocatePool(NonPagedPool, StreamDescriptorSize);
166  if (!StreamDescriptor)
167  return;
168 
169  /* Zero stream descriptor */
170  RtlZeroMemory(StreamDescriptor, StreamDescriptorSize);
171 
172  /* Get our DeviceExtension */
173  DeviceExtension = (PSTREAM_DEVICE_EXTENSION) ((ULONG_PTR)HwDeviceExtension - sizeof(STREAM_DEVICE_EXTENSION));
174  ASSERT(DeviceExtension->DeviceExtension == HwDeviceExtension);
175 
176 
177  /* Zero RequestBlock */
178  RtlZeroMemory(&RequestBlock, sizeof(HW_STREAM_REQUEST_BLOCK_EXT));
179 
180  /* Setup get stream info struct */
181  RequestBlock.Block.SizeOfThisPacket = sizeof(HW_STREAM_REQUEST_BLOCK);
182  RequestBlock.Block.Command = SRB_GET_STREAM_INFO;
183  RequestBlock.Block.CommandData.StreamBuffer = StreamDescriptor;
185 
186  /* FIXME SYNCHRONIZATION */
187 
188  /* Send the request */
189  DeviceExtension->DriverExtension->Data.HwReceivePacket ((PHW_STREAM_REQUEST_BLOCK)&RequestBlock);
190 
191  /* Is the device already completed? */
192  if (RequestBlock.Block.Status == STATUS_PENDING)
193  {
194  /* Request is pending, wait for result */
195  KeWaitForSingleObject(&RequestBlock.Event, Executive, KernelMode, FALSE, NULL);
196  }
197 
198  if (!NT_SUCCESS(RequestBlock.Block.Status))
199  {
200  /* Release Stream descriptor */
201  ExFreePool(StreamDescriptor);
202  }
203  else
204  {
205  if (DeviceExtension->StreamDescriptor)
206  {
207  /* Release old stream descriptor */
208  ExFreePool(DeviceExtension->StreamDescriptor);
209  }
210 
211  /* Store stream descriptor */
212  DeviceExtension->StreamDescriptor = StreamDescriptor;
213  DeviceExtension->StreamDescriptorSize = StreamDescriptorSize;
214  }
215 
216 }
217 
218 /*
219  *@implemented
220  */
221 
222 VOID
223 NTAPI
225  IN PCHAR File,
226  IN ULONG Line,
227  IN PCHAR AssertText,
228  IN ULONG AssertValue)
229 {
230 #if DBG
231  DbgBreakPoint();
232 #endif
233 }
234 
235 /*
236  *@implemented
237  */
238 VOID
239 __cdecl
241  IN STREAM_DEBUG_LEVEL DebugPrintLevel,
242  IN PCCHAR DebugMessage,
243  ...)
244 {
245 #if DBG
246  va_list ap;
247 
248  if (DebugPrintLevel <=STREAMDEBUG_LEVEL)
249  {
250  va_start(ap, DebugMessage);
251 
252  DbgPrint(DebugMessage, ap);
253 
254  va_end(ap);
255  }
256 #endif
257 
258 }
259 
260 /*
261  *@unimplemented
262  */
263 VOID
264 __cdecl
267  IN PVOID HwDeviceExtension,
269  IN PKSEVENT_ENTRY EventEntry,
270  IN GUID *EventSet,
271  IN ULONG EventId)
272 {
273  PHW_STREAM_REQUEST_BLOCK_EXT RequestBlock;
274  if (NotificationType == DeviceRequestComplete)
275  {
276  RequestBlock = (PHW_STREAM_REQUEST_BLOCK_EXT)pSrb;
277 
278  KeSetEvent(&RequestBlock->Event, 0, FALSE);
279  return;
280  }
281 
283 }
284 
285 /*
286  *@implemented
287  */
288 PVOID
289 STREAMAPI
291  IN PVOID HwDeviceExtension)
292 {
293  PSTREAM_DEVICE_EXTENSION DeviceExtension;
294 
295  /* Get our DeviceExtension */
296  DeviceExtension = (PSTREAM_DEVICE_EXTENSION) ((ULONG_PTR)HwDeviceExtension - sizeof(STREAM_DEVICE_EXTENSION));
297  ASSERT(DeviceExtension->DeviceExtension == HwDeviceExtension);
298 
299  return DeviceExtension->DmaCommonBuffer;
300 }
301 
302 NTSTATUS
303 NTAPI
306  IN PIRP Irp,
307  IN PVOID Context)
308 {
310 
311  IoStatusBlock->Information = Irp->IoStatus.Information;
312  IoStatusBlock->Status = Irp->IoStatus.Status;
313 
314  return STATUS_SUCCESS;
315 }
316 
317 /*
318  *@implemented
319  */
320 BOOLEAN
321 STREAMAPI
323  IN PVOID HwDeviceExtension,
324  IN BOOLEAN Read,
325  IN PVOID Buffer,
326  IN ULONG OffSet,
327  IN ULONG Length)
328 {
329  PIRP Irp;
330  ULONG MajorFunction;
331  KEVENT Event;
332  PSTREAM_DEVICE_EXTENSION DeviceExtension;
334  IO_STATUS_BLOCK StatusBlock;
336 
337  /* Get our DeviceExtension */
338  DeviceExtension = (PSTREAM_DEVICE_EXTENSION) ((ULONG_PTR)HwDeviceExtension - sizeof(STREAM_DEVICE_EXTENSION));
339  ASSERT(DeviceExtension->DeviceExtension == HwDeviceExtension);
340 
341  if (Read)
342  {
343  /* Zero input buffer */
345  }
346 
347  /* Set request type */
348  MajorFunction = (Read ? IRP_MJ_READ : IRP_MJ_WRITE);
349 
350  /* Initialize event */
352 
353  /* Set offset */
354  Offset.QuadPart = OffSet;
355 
356  /* Pre-init status block */
357  StatusBlock.Status = STATUS_NOT_SUPPORTED;
358 
359  /* Create Irp */
360  Irp = IoBuildSynchronousFsdRequest(MajorFunction,
361  DeviceExtension->LowerDeviceObject, /* Verify */
362  Buffer,
363  Length,
364  &Offset,
365  &Event,
366  &StatusBlock);
367 
368  if (!Irp)
369  {
370  /* Failed to allocate memory */
371  return FALSE;
372  }
373 
374  /* Setup a completion routine */
376 
377  /* Call driver */
378  Status = IoCallDriver(DeviceExtension->LowerDeviceObject, Irp);
379 
380  if (Status == STATUS_PENDING)
381  {
382  /* Request is pending, wait for result */
384  /* Fetch result */
385  Status = StatusBlock.Status;
386  }
387 
388  if (!NT_SUCCESS(Status))
389  {
390  return FALSE;
391  }
392 
393  /* FIXME Handle Length != InputLength */
394  return TRUE;
395 }
#define DO_DEVICE_INITIALIZING
Definition: env_spec_w32.h:399
signed char * PCHAR
Definition: retypes.h:7
#define DO_POWER_PAGABLE
#define STATUS_DEVICE_DOES_NOT_EXIST
Definition: ntstatus.h:414
#define IN
Definition: typedefs.h:38
_In_ BOOLEAN Read
Definition: strmini.h:479
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
NTSTATUS NTAPI StreamClassCreateFilter(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: filter.c:261
VOID NTAPI StreamClassInterruptDpc(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: pnp.c:74
#define IRP_MJ_FLUSH_BUFFERS
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1764
#define __cdecl
Definition: accygwin.h:79
#define DbgPrint
Definition: loader.c:25
KSDDKAPI NTSTATUS NTAPI KsAllocateDeviceHeader(OUT KSDEVICE_HEADER *OutHeader, IN ULONG ItemsCount, IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL)
Definition: api.c:522
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:1069
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI StreamClassPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:15
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
HW_INITIALIZATION_DATA Data
Definition: stream.h:13
LONG NTSTATUS
Definition: precomp.h:26
KSDDKAPI VOID NTAPI KsNullDriverUnload(IN PDRIVER_OBJECT DriverObject)
Definition: irp.c:1145
ULONG DeviceExtensionSize
Definition: srb.h:566
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:1296
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1122
NTSTATUS NTAPI StreamClassCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:39
struct _HW_STREAM_REQUEST_BLOCK HW_STREAM_REQUEST_BLOCK
void DbgBreakPoint()
Definition: mach.c:553
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:159
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
#define DO_DIRECT_IO
Definition: env_spec_w32.h:396
KSDDKAPI NTSTATUS NTAPI KsSetMajorFunctionHandler(IN PDRIVER_OBJECT DriverObject, IN ULONG MajorFunction)
Definition: irp.c:2017
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
uint32_t ULONG_PTR
Definition: typedefs.h:63
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define va_end(ap)
Definition: acmsvcex.h:90
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
KSDEVICE_HEADER Header
Definition: stream.h:26
NTSTATUS NTAPI StreamClassFlushBuffers(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:51
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:966
PDRIVER_EXTENSION DriverExtension
Definition: iotypes.h:2174
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
char * va_list
Definition: acmsvcex.h:78
Definition: bufpool.h:45
void * PVOID
Definition: retypes.h:9
#define FILE_AUTOGENERATED_DEVICE_NAME
Definition: iotypes.h:138
_In_ PVOID Argument2
Definition: classpnp.h:680
VOID NTAPI StreamClassDebugAssert(IN PCHAR File, IN ULONG Line, IN PCHAR AssertText, IN ULONG AssertValue)
Definition: driver.c:224
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
PDEVICE_OBJECT PhysicalDeviceObject
Definition: stream.h:28
struct STREAM_DEVICE_EXTENSION * PSTREAM_DEVICE_EXTENSION
NTSTATUS STREAMAPI StreamClassRegisterAdapter(IN PVOID Argument1, IN PVOID Argument2, IN PHW_INITIALIZATION_DATA HwInitializationData)
Definition: driver.c:106
VOID __cdecl StreamClassDebugPrint(IN STREAM_DEBUG_LEVEL DebugPrintLevel, IN PCCHAR DebugMessage,...)
Definition: driver.c:240
struct _IO_STATUS_BLOCK * PIO_STATUS_BLOCK
Definition: change.c:34
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
PHW_STREAM_DESCRIPTOR StreamDescriptor
Definition: stream.h:43
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
Definition: ncftp.h:79
HW_STREAM_REQUEST_BLOCK Block
Definition: stream.h:53
#define IRP_MJ_POWER
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
struct HW_STREAM_REQUEST_BLOCK_EXT * PHW_STREAM_REQUEST_BLOCK_EXT
static const WCHAR L[]
Definition: oid.c:1250
PHW_STREAM_DESCRIPTOR StreamBuffer
Definition: strmini.h:232
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2180
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
_In_z_ PCCHAR _In_ PDEVICE_OBJECT LowerDeviceObject
Definition: classpnp.h:789
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1842
#define IRP_MJ_SYSTEM_CONTROL
Status
Definition: gdiplustypes.h:24
union _HW_STREAM_REQUEST_BLOCK::_CommandData CommandData
PVOID STREAMAPI StreamClassGetDmaBuffer(IN PVOID HwDeviceExtension)
Definition: driver.c:290
NTSTATUS NTAPI StreamClassAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: driver.c:13
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
PDRIVER_ADD_DEVICE AddDevice
Definition: iotypes.h:2112
NTSTATUS NTAPI StreamClassPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:448
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
VOID NTAPI StreamClassReenumerateStreams(IN PVOID HwDeviceExtension, IN ULONG StreamDescriptorSize)
Definition: driver.c:154
NTSTATUS NTAPI StreamClassDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:63
#define FILE_DEVICE_KS
Definition: winioctl.h:152
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
ULONG StreamDescriptorSize
Definition: stream.h:42
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define va_start(ap, A)
Definition: acmsvcex.h:91
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define STREAMAPI
Definition: strmini.h:8
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_CLEANUP
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2181
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define UNIMPLEMENTED
Definition: debug.h:114
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
PSTREAM_CLASS_DRIVER_EXTENSION DriverExtension
Definition: stream.h:44
VOID __cdecl StreamClassDeviceNotification(IN STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension, IN PHW_STREAM_REQUEST_BLOCK pSrb, IN PKSEVENT_ENTRY EventEntry, IN GUID *EventSet, IN ULONG EventId)
Definition: driver.c:265
BOOLEAN STREAMAPI StreamClassReadWriteConfig(IN PVOID HwDeviceExtension, IN BOOLEAN Read, IN PVOID Buffer, IN ULONG OffSet, IN ULONG Length)
Definition: driver.c:322
struct _KSEVENT_ENTRY * PKSEVENT_ENTRY
Definition: ks.h:2101
STREAM_DEBUG_LEVEL
Definition: strmini.h:11
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
SRB_COMMAND Command
Definition: strmini.h:224
#define FILE_DEVICE_SECURE_OPEN
Definition: cdrw_usr.h:46
#define STREAMDEBUG_LEVEL
Definition: stream.h:7
Definition: File.h:15
PDEVICE_OBJECT LowerDeviceObject
Definition: stream.h:27
LIST_ENTRY MemoryResourceList
Definition: stream.h:40
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711
return STATUS_SUCCESS
Definition: btrfs.c:2938
PHW_RECEIVE_DEVICE_SRB HwReceivePacket
Definition: strmini.h:356
struct _DRIVER_OBJECT * PDRIVER_OBJECT
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
enum _STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE
NTSTATUS NTAPI StreamClassRWCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: driver.c:304
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:664
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
NTSTATUS NTAPI StreamClassSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:27