ReactOS 0.4.16-dev-320-g3bd9ddc
data.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Drivers
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/sac/driver/data.c
5 * PURPOSE: Driver for the Server Administration Console (SAC) for EMS
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include "sacdrv.h"
12
13/* GLOBALS ********************************************************************/
14
23
24/* FUNCTIONS ******************************************************************/
25
26VOID
29{
30 /* Call the worker function */
31 ConMgrWorkerProcessEvents(DeviceExtension);
32}
33
34VOID
37{
38 /* Call the worker function */
40}
41
45{
46 /* TODO */
48}
49
53{
57 PACL Dacl = NULL;
58 PVOID ObjectSecurityDescriptor = NULL;
59 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC CreateDeviceSecurityDescriptor: Entering.\n");
60
61 /* Get the current SD of the device object */
63 if (!NT_SUCCESS(Status))
64 {
65 SAC_DBG(SAC_DBG_INIT, "SAC: Unable to get security descriptor, error: %x\n", Status);
67 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC CreateDeviceSecurityDescriptor: Exiting with status 0x%x\n", Status);
68 return Status;
69 }
70
71 /* Build a DACL for it */
73 if (Status >= 0)
74 {
76 }
77 else
78 {
79 SAC_DBG(SAC_DBG_INIT, "SAC CreateDeviceSecurityDescriptor : Unable to create Raw ACL, error : %x\n", Status);
80 /* FIXME: Temporary hack */
82 goto CleanupPath;
83 }
84
85CleanupPath:
86 /* Release the SD we queried */
88
89 /* Free anything else we may have allocated */
90 if (ObjectSecurityDescriptor) ExFreePool(ObjectSecurityDescriptor);
91 if (Dacl) SacFreePool(Dacl);
92
93 /* All done */
94 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC CreateDeviceSecurityDescriptor: Exiting with status 0x%x\n", Status);
95 return Status;
96}
97
98VOID
101{
103 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Entering.\n");
104
105 /* Only free if we allocated */
107 {
108 /* Close the SAC event if we had created one */
109 if (SACEvent)
110 {
112 SACEvent = NULL;
113 }
114
115 /* Destroy the cached messages */
117
118 /* Delete the Win32 symbolic link */
119 RtlInitUnicodeString(&SymbolicLink, L"\\DosDevices\\SAC");
121
122 /* Tear down connections */
124
125 /* Tear down channels */
127
128 /* Free the serial port buffer */
130
131 /* Free cached machine information */
133
134 /* Cleanup the custom heap allocator */
136
137 /* We're back to a virgin state */
139 }
140
141 /* All done */
142 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Exiting.\n");
143}
144
145VOID
146NTAPI
148{
149 PSAC_DEVICE_EXTENSION DeviceExtension;
152 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeDeviceData: Entering.\n");
153
154 /* Get the device extension and see how far we had gotten */
155 DeviceExtension = (PSAC_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
156 if (!(GlobalDataInitialized) || !(DeviceExtension->Initialized))
157 {
158 goto Exit;
159 }
160
161 /* Attempt to rundown while holding the lock */
162 KeAcquireSpinLock(&DeviceExtension->Lock, &OldIrql);
163 while (DeviceExtension->RundownInProgress)
164 {
165 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeDeviceData: Waiting....\n");
166
167 /* Initiate and wait for rundown */
169 KeReleaseSpinLock(&DeviceExtension->Lock, OldIrql);
170 Status = KeWaitForSingleObject(&DeviceExtension->RundownEvent,
171 Executive,
173 FALSE,
174 NULL);
176
177 /* Re-acquire the lock and check if rundown is done */
178 KeAcquireSpinLock(&DeviceExtension->Lock, &OldIrql);
179 }
180
181 /* Now set the rundown flag while we cancel the timer */
182 DeviceExtension->RundownInProgress = TRUE;
183 KeReleaseSpinLock(&DeviceExtension->Lock, OldIrql);
184
185 /* Cancel it */
186 KeCancelTimer(&DeviceExtension->Timer);
187
188 /* Reacquire the lock*/
189 KeAcquireSpinLock(&DeviceExtension->Lock, &OldIrql);
190 DeviceExtension->RundownInProgress = FALSE;
191
192 /* Now do the last rundown attempt, we should be the only ones here */
194 KeReleaseSpinLock(&DeviceExtension->Lock, OldIrql);
195 KeSetEvent(&DeviceExtension->Event, DeviceExtension->PriorityBoost, 0);
196 Status = KeWaitForSingleObject(&DeviceExtension->RundownEvent,
197 Executive,
199 FALSE,
200 NULL);
202
203 /* We no longer care about shutdown */
205
206 /* We are now fully uninitialized */
207 KeAcquireSpinLock(&DeviceExtension->Lock, &OldIrql);
208 DeviceExtension->Initialized = FALSE;
209 KeReleaseSpinLock(&DeviceExtension->Lock, OldIrql);
210Exit:
211 SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeDeviceData: Exiting.\n");
212}
213
215NTAPI
217{
218 PSAC_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
219 BOOLEAN EnableData;
220 ULONG PriorityValue;
224 PAGED_CODE();
225 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering.\n");
226
227 /* If we already did this, bail out */
228 if (DeviceExtension->Initialized) goto SuccessExit;
229
230 /* Setup the DO flags */
231 DeviceObject->Flags |= DO_DIRECT_IO;
232 DeviceObject->StackSize = 16;
233
234 /* Setup the device extension */
235 DeviceExtension->DeviceObject = DeviceObject;
236 DeviceExtension->PriorityBoost = IO_SERIAL_INCREMENT;
237 DeviceExtension->PriorityFail = 0;
238 DeviceExtension->RundownInProgress = 0;
239
240 /* Initialize locks, events, timers, DPCs, etc... */
241 KeInitializeTimer(&DeviceExtension->Timer);
242 KeInitializeDpc(&DeviceExtension->Dpc, TimerDpcRoutine, DeviceExtension);
243 KeInitializeSpinLock(&DeviceExtension->Lock);
245 InitializeListHead(&DeviceExtension->List);
246
247 /* Attempt to enable HDL support */
248 EnableData = TRUE;
250 &EnableData,
251 sizeof(EnableData),
252 NULL,
253 NULL);
254 if (!NT_SUCCESS(Status))
255 {
256 /* Bail out if we couldn't even get this far */
257 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting (1) with status FALSE\n");
258 return FALSE;
259 }
260
261 /* Remember which process we started in */
262 DeviceExtension->Process = IoGetCurrentProcess();
263
264 /* Protect the device against non-admins */
266 if (!NT_SUCCESS(Status))
267 {
268 /* Write down why we failed */
269 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting (2) with status FALSE\n");
270
271 /* Disable the HDL terminal on failure */
272 EnableData = FALSE;
274 &EnableData,
275 sizeof(EnableData),
276 NULL,
277 NULL);
278 if (!NT_SUCCESS(Status)) SAC_DBG(SAC_DBG_INIT, "Failed dispatch\n");
279
280 /* Bail out */
281 return FALSE;
282 }
283
284 /* Create the worker thread */
287 NULL,
288 NULL,
289 NULL,
291 DeviceExtension);
292 if (!NT_SUCCESS(Status))
293 {
294 /* Write down why we failed */
295 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting (3) with status FALSE\n");
296
297 /* Disable the HDL terminal on failure */
298 EnableData = FALSE;
300 &EnableData,
301 sizeof(EnableData),
302 NULL,
303 NULL);
304 if (!NT_SUCCESS(Status)) SAC_DBG(SAC_DBG_INIT, "Failed dispatch\n");
305
306 /* Bail out */
307 return FALSE;
308 }
309
310 /* Set the priority of our thread to highest */
311 PriorityValue = HIGH_PRIORITY;
314 &PriorityValue,
315 sizeof(PriorityValue));
316 if (!NT_SUCCESS(Status))
317 {
318 /* For debugging, write down why we failed */
319 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting (6) with status FALSE\n");
320 DeviceExtension->PriorityFail = TRUE;
321
322 /* Initialize rundown and wait for the thread to do it */
324 KeSetEvent(&DeviceExtension->Event, DeviceExtension->PriorityBoost, FALSE);
325 Status = KeWaitForSingleObject(&DeviceExtension->RundownEvent,
326 Executive,
328 FALSE,
329 NULL);
331
332 /* Disable the HDL terminal on failure */
333 EnableData = FALSE;
335 &EnableData,
336 sizeof(EnableData),
337 NULL,
338 NULL);
339 if (!NT_SUCCESS(Status)) SAC_DBG(SAC_DBG_INIT, "Failed dispatch\n");
340
341 /* Bail out */
342 return FALSE;
343 }
344
345 /* The first "packet" is the machine information in XML... */
347 if (NT_SUCCESS(Status))
348 {
349 /* Go ahead and send it */
350 UTF8EncodeAndSend(L"<?xml version=\"1.0\"?>\r\n");
352
353 /* Free the temporary buffer */
355 }
356
357 /* Finally, initialize the I/O Manager */
359 if (!NT_SUCCESS(Status)) return FALSE;
360
361 /* Set the timer. Once this is done, the device is initialized */
362 DueTime.QuadPart = -4000;
363 KeSetTimerEx(&DeviceExtension->Timer, DueTime, 4, &DeviceExtension->Dpc);
364 DeviceExtension->Initialized = TRUE;
365
366SuccessExit:
367 /* Success path -- everything worked */
368 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with status TRUE\n");
369 return TRUE;
370}
371
373NTAPI
376{
378 UNICODE_STRING LinkName;
380 UNICODE_STRING EventName;
381 PAGED_CODE();
382 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering.\n");
383
384 /* If we already did this, bail out */
385 if (GlobalDataInitialized) goto SuccessExit;
386
387 /* Setup the symbolic link for Win32 support */
388 RtlInitUnicodeString(&LinkName, L"\\DosDevices\\SAC");
389 RtlInitUnicodeString(&DeviceName, L"\\Device\\SAC");
391 if (!NT_SUCCESS(Status)) return FALSE;
392
393 /* Initialize the internal heap manager */
395 {
396 IoDeleteSymbolicLink(&LinkName);
397 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with status FALSE\n");
398 return FALSE;
399 }
400
401 /* Preload the messages in memory */
403 if (!NT_SUCCESS(Status))
404 {
405 IoDeleteSymbolicLink(&LinkName);
406 SAC_DBG(SAC_DBG_INIT, "unable to pre-load message table: %X\n", Status);
407 return FALSE;
408 }
409
410 /* Check if the administrator enabled this */
412 if (!NT_SUCCESS(Status))
413 {
414 /* Is it enabled? */
416 {
417 /* Set the service start type to the correct value */
419 if (!NT_SUCCESS(Status))
420 {
421 SAC_DBG(SAC_DBG_INIT, "failed ImposeSacCmdServiceStartTypePolicy: %X\n", Status);
422 }
423 }
424
425 /* We're going to keep going with the default */
426 SAC_DBG(SAC_DBG_INIT, "failed GetCommandConsoleLaunchingPermission: %X\n", Status);
427 }
428
429 /* Allocate the UTF-8 Conversion Buffer */
432 {
433 /* Handle failure case */
435 IoDeleteSymbolicLink(&LinkName);
436 SAC_DBG(SAC_DBG_INIT, "unable to allocate memory for UTF8 translation\n");
437 return FALSE;
438 }
439
440 /* Initialize the channel manager */
442 if (!NT_SUCCESS(Status))
443 {
444 /* Handle failure case */
447 IoDeleteSymbolicLink(&LinkName);
448 SAC_DBG(SAC_DBG_INIT, "Failed to create SAC Channel\n");
449 return FALSE;
450 }
451
452 /* Allocate the serial port buffer */
454 if (!SerialPortBuffer)
455 {
456 /* Handle failure case */
459 IoDeleteSymbolicLink(&LinkName);
460 SAC_DBG(SAC_DBG_INIT, "Failed to allocate Serial Port Buffer\n");
461 return FALSE;
462 }
463
464 /* Zero it out */
466
467 /* Initialize command events. After this, driver data is good to go */
471 ProcessingType = 0;
472 IoctlSubmitted = 0;
473
474 /* Create the SAC event */
475 RtlInitUnicodeString(&EventName, L"\\SACEvent");
477 if (!SACEvent)
478 {
479 /* Handle failure case */
482 IoDeleteSymbolicLink(&LinkName);
483 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with event NULL\n");
484 return FALSE;
485 }
486
487 /* Cache machine information */
489
490 /* Register it */
492 if (!NT_SUCCESS(Status))
493 {
494 /* Handle failure case */
497 IoDeleteSymbolicLink(&LinkName);
498 SAC_DBG(SAC_DBG_INIT, "Failed to register blue screen machine info\n");
499 return FALSE;
500 }
501
502SuccessExit:
503 /* Success path -- everything worked */
504 SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with status TRUE\n");
505 return TRUE;
506}
#define PAGED_CODE()
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI ChanMgrInitialize(VOID)
Definition: chanmgr.c:118
NTSTATUS NTAPI ChanMgrShutdown(VOID)
Definition: chanmgr.c:144
VOID NTAPI ConMgrWorkerProcessEvents(IN PSAC_DEVICE_EXTENSION DeviceExtension)
Definition: conmgr.c:835
NTSTATUS NTAPI ConMgrInitialize(VOID)
Definition: conmgr.c:163
NTSTATUS NTAPI ConMgrShutdown(VOID)
Definition: conmgr.c:372
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
@ ThreadPriority
Definition: compat.h:937
static const WCHAR SymbolicLink[]
Definition: interface.c:31
static const WCHAR Message[]
Definition: register.c:74
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:712
ULONG SACDebug
Definition: data.c:15
BOOLEAN NTAPI InitializeDeviceData(IN PDEVICE_OBJECT DeviceObject)
Definition: data.c:216
HANDLE SACEventHandle
Definition: data.c:22
BOOLEAN IoctlSubmitted
Definition: data.c:19
NTSTATUS NTAPI CreateDeviceSecurityDescriptor(IN PDEVICE_OBJECT *DeviceObject)
Definition: data.c:52
NTSTATUS NTAPI BuildDeviceAcl(OUT PACL *Dacl)
Definition: data.c:44
VOID NTAPI WorkerThreadStartUp(IN PVOID Context)
Definition: data.c:36
VOID NTAPI FreeGlobalData(VOID)
Definition: data.c:100
BOOLEAN GlobalDataInitialized
Definition: data.c:17
PKEVENT SACEvent
Definition: data.c:21
ULONG ProcessingType
Definition: data.c:20
BOOLEAN CommandConsoleLaunchingEnabled
Definition: data.c:16
VOID NTAPI FreeDeviceData(IN PDEVICE_OBJECT DeviceObject)
Definition: data.c:147
BOOLEAN NTAPI InitializeGlobalData(IN PUNICODE_STRING RegistryPath, IN PDRIVER_OBJECT DriverObject)
Definition: data.c:374
KMUTEX SACCMDEventInfoMutex
Definition: data.c:18
VOID NTAPI WorkerProcessEvents(IN PSAC_DEVICE_EXTENSION DeviceExtension)
Definition: data.c:28
VOID NTAPI TimerDpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dispatch.c:61
VOID NTAPI FreeMemoryManagement(VOID)
Definition: memory.c:62
BOOLEAN NTAPI InitializeMemoryManagement(VOID)
Definition: memory.c:23
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define DO_DIRECT_IO
Definition: env_spec_w32.h:396
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
Status
Definition: gdiplustypes.h:25
@ HeadlessCmdEnableTerminal
Definition: hdl.h:129
NTSTATUS NTAPI HeadlessDispatch(IN HEADLESS_CMD Command, IN PVOID InputBuffer, IN SIZE_T InputBufferSize, OUT PVOID OutputBuffer, OUT PSIZE_T OutputBufferSize)
Definition: hdlsterm.c:570
#define HIGH_PRIORITY
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
#define KernelMode
Definition: asm.h:34
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1605
#define THREAD_ALL_ACCESS
Definition: nt_native.h:1339
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
@ SynchronizationEvent
VOID NTAPI IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
Definition: device.c:1725
PKEVENT NTAPI IoCreateSynchronizationEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
Definition: ioevent.c:82
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:139
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
Definition: mutex.c:67
NTSTATUS NTAPI NtSetInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
Definition: query.c:2018
NTSTATUS NTAPI PsCreateSystemThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE ProcessHandle, IN PCLIENT_ID ClientId, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext)
Definition: thread.c:602
#define L(x)
Definition: ntvdm.h:50
NTSTATUS NTAPI ObGetObjectSecurity(IN PVOID Object, OUT PSECURITY_DESCRIPTOR *SecurityDescriptor, OUT PBOOLEAN MemoryAllocated)
Definition: obsecure.c:611
VOID NTAPI ObReleaseObjectSecurity(IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN BOOLEAN MemoryAllocated)
Definition: obsecure.c:709
NTSTATUS NTAPI UTF8EncodeAndSend(IN PWCHAR String)
Definition: util.c:165
#define SAC_DBG(x,...)
Definition: sacdrv.h:37
#define SacAllocatePool(Length, Tag)
Definition: sacdrv.h:24
NTSTATUS NTAPI ImposeSacCmdServiceStartTypePolicy(VOID)
Definition: util.c:1008
ULONG Utf8ConversionBufferSize
Definition: util.c:18
NTSTATUS NTAPI PreloadGlobalMessageTable(IN PVOID ImageBase)
Definition: util.c:280
NTSTATUS NTAPI RegisterBlueScreenMachineInformation(VOID)
Definition: util.c:1104
VOID NTAPI FreeMachineInformation(VOID)
Definition: util.c:1156
PCHAR SerialPortBuffer
Definition: util.c:35
#define SAC_DBG_ENTRY_EXIT
Definition: sacdrv.h:32
NTSTATUS NTAPI GetCommandConsoleLaunchingPermission(OUT PBOOLEAN Permission)
Definition: util.c:981
#define SAC_SERIAL_PORT_BUFFER_SIZE
Definition: sacdrv.h:155
VOID NTAPI InitializeMachineInformation(VOID)
Definition: util.c:692
VOID NTAPI InitializeCmdEventInfo(VOID)
Definition: util.c:1062
PCHAR Utf8ConversionBuffer
Definition: util.c:17
#define SAC_DBG_INIT
Definition: sacdrv.h:34
#define GLOBAL_BLOCK_TAG
Definition: sacdrv.h:142
NTSTATUS NTAPI TearDownGlobalMessageTable(VOID)
Definition: util.c:379
NTSTATUS NTAPI TranslateMachineInformationXML(IN PWCHAR *Buffer, IN PWCHAR ExtraData)
Definition: util.c:541
struct _SAC_DEVICE_EXTENSION * PSAC_DEVICE_EXTENSION
#define SacFreePool(Pointer)
Definition: sacdrv.h:26
#define STATUS_SUCCESS
Definition: shellext.h:65
static void Exit(void)
Definition: sock.c:1330
BOOLEAN PriorityFail
Definition: sacdrv.h:511
BOOLEAN Initialized
Definition: sacdrv.h:509
KSPIN_LOCK Lock
Definition: sacdrv.h:515
LIST_ENTRY List
Definition: sacdrv.h:522
HANDLE WorkerThreadHandle
Definition: sacdrv.h:518
BOOLEAN RundownInProgress
Definition: sacdrv.h:512
PEPROCESS Process
Definition: sacdrv.h:514
PDEVICE_OBJECT DeviceObject
Definition: sacdrv.h:508
KPRIORITY PriorityBoost
Definition: sacdrv.h:513
BOOLEAN NTAPI KeSetTimerEx(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN LONG Period, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:294
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
Definition: timerobj.c:206
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
Definition: timerobj.c:233
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_In_ WDFTIMER _In_ LONGLONG DueTime
Definition: wdftimer.h:190
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
#define IO_SERIAL_INCREMENT
Definition: iotypes.h:607
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
@ Executive
Definition: ketypes.h:415
_Out_ PSECURITY_DESCRIPTOR _Out_ PBOOLEAN MemoryAllocated
Definition: obfuncs.h:24
#define NT_ASSERT
Definition: rtlfuncs.h:3327