ReactOS 0.4.15-dev-5865-g640e228
mxgeneral.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5ModuleName:
6
7 MxGeneral.h
8
9Abstract:
10
11 Mode agnostic definitions for general OS
12 functions used in framework code
13
14 See MxGeneralKm.h and MxGeneralUm.h for mode
15 specific implementations
16
17Author:
18
19
20
21Revision History:
22
23
24
25--*/
26
27#pragma once
28
29//
30// Placeholder macro for a no-op
31//
32#define DO_NOTHING() (0)
33
34//
35// We need to make these static functions of the class
36// to force common definition to apply to um and km versions
37//
38// If we don't do this, um and km definitions can diverge
39//
40class Mx
41{
42public:
43
44 //
45 // IsUM/IsKM don't change at runtime
46 // but defining them as functions makes it more convenient to check
47 // for UM/KM as compared to using ifdef's in certain places
48 //
49 // Since they are forceinlined and return a constant value,
50 // optimized code is no different than using an ifdef
51 //
52 // See FxPoolAllocator in WdfPool.cpp for example of such usage
53 //
54 __inline
55 static
57 IsUM(
58 );
59
60 __inline
61 static
63 IsKM(
64 );
65
66 __inline
67 static
70 );
71
72 __inline
73 static
76 );
77
79 static
82 );
83
84 __inline
85 static
86 KIRQL
88 );
89
92 __inline
93 static
94 VOID
95 MxRaiseIrql(
98 );
99
101 __inline
102 static
103 VOID
104 MxLowerIrql(
106 );
107
108 __inline
109 static
110 VOID
112 __out PLARGE_INTEGER TickCount
113 );
114
115 __inline
116 static
117 ULONG
119 );
120
121
122
123
124
125
126
127
128 static
130 VOID
132 __in ULONG BugCheckCode,
133 __in ULONG_PTR BugCheckParameter1,
134 __in ULONG_PTR BugCheckParameter2,
135 __in ULONG_PTR BugCheckParameter3,
136 __in ULONG_PTR BugCheckParameter4
137 );
138
139 __inline
140 static
141 VOID
143 );
144
145 static
146 VOID
149 __in PCSTR DebugMessage,
150 ...
151 );
152
153 __inline
154 static
155 VOID
156 MxAssert(
158 );
159
160 __inline
161 static
162 VOID
166 );
167
168 _Acquires_lock_(_Global_critical_region_)
169 __inline
170 static
171 VOID
172 MxEnterCriticalRegion(
173 );
174
175 _Releases_lock_(_Global_critical_region_) //implies _Requires_lock_held_(_Global_critical_region_)
176 __inline
177 static
178 VOID
179 MxLeaveCriticalRegion(
180 );
181
182 __inline
183 static
184 VOID
186 __in KPROCESSOR_MODE WaitMode,
189 );
190
191 //
192 // Mode agnostic function to get address of a system function
193 // Should be used only for Rtl* functions applicable both to
194 // kernel mode and user mode
195 //
196 // User mode version is assumed to reside in ntdll.dll
197 //
198 // The argument type is MxFuncName so that it can be defined
199 // as LPCWSTR in kernel mode and LPCSTR in user mode
200 // which is what MmGetSystemRoutineAddress and GetProcAddress
201 // expect respectively
202 //
203 __inline
204 static
205 PVOID
208 );
209
210 __inline
211 static
212 VOID
215 );
216
217 __inline
218 static
219 VOID
222 );
223
224 __inline
225 static
226 VOID
232 );
233
234 __inline
235 static
238 __in MdRemoveLock RemoveLock,
240 );
241
242 __inline
243 static
244 VOID
246 __in MdRemoveLock RemoveLock,
248 );
249
250 __inline
251 static
252 VOID
254 __in MdRemoveLock RemoveLock,
256 );
257
258 __inline
259 static
260 BOOLEAN
262 VOID
263 );
264
265
266 _Releases_lock_(_Global_cancel_spin_lock_) //implies _Requires_lock_held_(_Global_cancel_spin_lock_)
268 __inline
269 static
270 VOID
271 ReleaseCancelSpinLock(
273 );
274
275 __inline
276 static
279 __out PCALLBACK_OBJECT *CallbackObject,
283 );
284
285 __inline
286 static
287 PVOID
289 __in PCALLBACK_OBJECT CallbackObject,
292 );
293
294 __inline
295 static
296 VOID
298 __in PVOID CbRegistration
299 );
300
301 static
302 VOID
304 VOID
305 );
306
307 __inline
308 static
309 VOID
312 );
313
314 __inline
315 static
316 PVOID
320 );
321
322 __inline
323 static
324 VOID
327 );
328
329 __inline
330 static
331 PVOID
335 );
336
337 __inline
338 static
343 _In_ ULONG DriverObjectExtensionSize,
344 // When successful, this always allocates already-aliased memory.
345 _Post_ _At_(*DriverObjectExtension, _When_(return==0,
347 _When_(return == 0, _Outptr_result_bytebuffer_(DriverObjectExtensionSize))
348 PVOID *DriverObjectExtension
349 );
350
351 __inline
352 static
356 );
357
358 __inline
359 static
360 VOID
363 );
364
365 __inline
366 static
367 VOID
370 );
371
372 __inline
373 static
374 VOID
377 );
378
379 __inline
380 static
381 VOID
384 _In_opt_ PALLOCATE_FUNCTION Allocate,
385 _In_opt_ PFREE_FUNCTION Free,
388 _In_ ULONG Tag,
390 );
391
392 __inline
393 static
394 VOID
397 _In_opt_ PALLOCATE_FUNCTION Allocate,
398 _In_opt_ PFREE_FUNCTION Free,
401 _In_ ULONG Tag,
403 );
404
405 __inline
406 static
407 VOID
410 );
411
412 static
413 VOID
416 );
417
418 __inline
419 static
424 );
425
426 __inline
427 static
431 _In_ ULONG DeviceExtensionSize,
436 _In_ PCUNICODE_STRING DefaultSDDLString,
439 );
440
441 __inline
442 static
446 _In_ ULONG DeviceExtensionSize,
452 );
453
454 __inline
455 static
460 );
461
462 __inline
463 static
464 VOID
466 );
467
468 __inline
469 static
471 MxOpenKey(
475 );
476
477 __inline
478 static
483 );
484
485 __inline
486 static
493 );
494
495 __inline
496 static
500 );
501
502 __inline
503 static
504 VOID
507 _In_ PVOID BaseVa,
509 );
510
511 __inline
512 static
513 PVOID
516 );
517
518 __inline
519 static
520 VOID
522 _In_ PMDL SourceMdl,
526 );
527
528 __inline
529 static
530 VOID
532 _Out_ PLARGE_INTEGER CurrentTime
533 );
534
535 __inline
536 static
545 );
546
547 __inline
548 static
554 _Out_opt_ PVOID KeyValueInformation,
557 );
558 __inline
559 static
568 );
569
570 __inline
571 static
575 );
576
577 __inline
578 static
580 MxClose (
582 );
583
584 __inline
585 static
586 KIRQL
589 );
590
591 __inline
592 static
593 VOID
597 );
598
599 __inline
600 static
601 BOOLEAN
606 );
607};
unsigned char BOOLEAN
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
@ Create
Definition: registry.c:563
#define __drv_aliasesMem
Definition: btrfs_drv.h:203
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1157
Definition: mxgeneral.h:41
static __inline VOID MxInitializePagedLookasideList(_Out_ PPAGED_LOOKASIDE_LIST Lookaside, _In_opt_ PALLOCATE_FUNCTION Allocate, _In_opt_ PFREE_FUNCTION Free, _In_ ULONG Flags, _In_ SIZE_T Size, _In_ ULONG Tag, _In_ USHORT Depth)
Definition: mxgeneralkm.h:472
static __inline VOID MxBuildPartialMdl(_In_ PMDL SourceMdl, _Inout_ PMDL TargetMdl, _In_ PVOID VirtualAddress, _In_ ULONG Length)
Definition: mxgeneralkm.h:663
_Releases_lock_(_Global_cancel_spin_lock_) __drv_requiresIRQL(DISPATCH_LEVEL) __inline static VOID ReleaseCancelSpinLock(__in __drv_restoresIRQL __drv_useCancelIRQL KIRQL Irql)
static __inline VOID MxQueryTickCount(__out PLARGE_INTEGER TickCount)
Definition: mxgeneralkm.h:116
_Acquires_lock_(_Global_critical_region_) __inline static VOID MxEnterCriticalRegion()
static __inline VOID MxDeletePagedLookasideList(_In_ PPAGED_LOOKASIDE_LIST LookasideList)
Definition: mxgeneralkm.h:442
static __inline KIRQL MxAcquireInterruptSpinLock(_Inout_ PKINTERRUPT Interrupt)
Definition: mxgeneralkm.h:767
static __inline NTSTATUS MxDeleteKey(_In_ HANDLE KeyHandle)
Definition: mxgeneralkm.h:634
static __inline VOID MxDbgBreakPoint()
Definition: mxgeneralkm.h:157
static __inline VOID MxReleaseRemoveLockAndWait(__in MdRemoveLock RemoveLock, __in PVOID Tag)
Definition: mxgeneralkm.h:288
static __inline PVOID MxGetDriverObjectExtension(__in MdDriverObject DriverObject, __in PVOID ClientIdentificationAddress)
Definition: mxgeneralkm.h:385
static __inline NTSTATUS MxReferenceObjectByHandle(__in HANDLE Handle, __in ACCESS_MASK DesiredAccess, __in_opt POBJECT_TYPE ObjectType, __in KPROCESSOR_MODE AccessMode, __out PVOID *Object, __out_opt POBJECT_HANDLE_INFORMATION HandleInformation)
Definition: mxgeneralkm.h:728
static __inline VOID MxReleaseInterruptSpinLock(_Inout_ PKINTERRUPT Interrupt, _In_ KIRQL OldIrql)
Definition: mxgeneralkm.h:776
static __inline NTSTATUS MxAcquireRemoveLock(__in MdRemoveLock RemoveLock, __in_opt PVOID Tag)
Definition: mxgeneralkm.h:268
static __inline VOID MxAssertMsg(__in LPSTR Message, __in BOOLEAN Condition)
Definition: mxgeneralkm.h:176
__out __deref __drv_savesIRQL PKIRQL OldIrql
Definition: mxgeneral.h:98
static __inline NTSTATUS MxRegisterDeviceInterface(_In_ PDEVICE_OBJECT PhysicalDeviceObject, _In_ const GUID *InterfaceClassGuid, _In_opt_ PUNICODE_STRING ReferenceString, _Out_ PUNICODE_STRING SymbolicLinkName)
Definition: mxgeneralkm.h:619
static __inline NTSTATUS MxSetValueKey(_In_ HANDLE KeyHandle, _In_ PUNICODE_STRING ValueName, _In_opt_ ULONG TitleIndex, _In_ ULONG Type, _In_opt_ PVOID Data, _In_ ULONG DataSize)
Definition: mxgeneralkm.h:688
static VOID MxGlobalInit(VOID)
Definition: mxgeneralkm.cpp:51
static __inline PVOID MxGetSystemRoutineAddress(__in MxFuncName FuncName)
Definition: mxgeneralkm.h:226
static __inline VOID MxInitializeRemoveLock(__in MdRemoveLock Lock, __in ULONG AllocateTag, __in ULONG MaxLockedMinutes, __in ULONG HighWatermark)
Definition: mxgeneralkm.h:256
static __inline MdEThread GetCurrentEThread()
Definition: mxgeneralkm.h:69
static __inline MdDeviceObject MxGetAttachedDeviceReference(__in MdDeviceObject DriverObject)
Definition: mxgeneralkm.h:415
static VOID MxDetachDevice(_Inout_ MdDeviceObject Device)
Definition: mxgeneralkm.h:502
static __inline VOID MxUnlockPages(__in PMDL Mdl)
Definition: mxgeneralkm.h:357
static NTSTATUS MxTerminateCurrentThread(__in NTSTATUS Status)
Definition: mxgeneralkm.h:77
static __inline PVOID MxGetMdlVirtualAddress(_In_ PMDL Mdl)
Definition: mxgeneralkm.h:654
static __inline BOOLEAN MxHasEnoughRemainingThreadStack(VOID)
Definition: mxgeneralkm.h:298
static __inline VOID MxDeleteSymbolicLink(__in PUNICODE_STRING Link)
Definition: mxgeneralkm.h:424
static __inline VOID UnregisterCallback(__in PVOID CbRegistration)
Definition: mxgeneralkm.h:348
static __inline NTSTATUS MxCreateDevice(_In_ MdDriverObject DriverObject, _In_ ULONG DeviceExtensionSize, _In_opt_ PUNICODE_STRING DeviceName, _In_ DEVICE_TYPE DeviceType, _In_ ULONG DeviceCharacteristics, _In_ BOOLEAN Exclusive, _Out_ MdDeviceObject *DeviceObject)
Definition: mxgeneralkm.h:557
static __inline NTSTATUS MxCreateDeviceSecure(_In_ MdDriverObject DriverObject, _In_ ULONG DeviceExtensionSize, _In_opt_ PUNICODE_STRING DeviceName, _In_ DEVICE_TYPE DeviceType, _In_ ULONG DeviceCharacteristics, _In_ BOOLEAN Exclusive, _In_ PCUNICODE_STRING DefaultSDDLString, _In_opt_ LPCGUID DeviceClassGuid, _Out_ MdDeviceObject *DeviceObject)
Definition: mxgeneralkm.h:521
static __inline VOID MxAssert(__in BOOLEAN Condition)
Definition: mxgeneralkm.h:165
static __inline VOID MxReleaseRemoveLock(__in MdRemoveLock RemoveLock, __in PVOID Tag)
Definition: mxgeneralkm.h:278
static __inline NTSTATUS MxQueryValueKey(_In_ HANDLE KeyHandle, _In_ PUNICODE_STRING ValueName, _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, _Out_opt_ PVOID KeyValueInformation, _In_ ULONG Length, _Out_ PULONG ResultLength)
Definition: mxgeneralkm.h:708
_Releases_lock_(_Global_critical_region_) __inline static VOID MxLeaveCriticalRegion()
static __inline NTSTATUS MxOpenKey(_Out_ PHANDLE KeyHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
Definition: mxgeneralkm.h:597
static __inline NTSTATUS CreateCallback(__out PCALLBACK_OBJECT *CallbackObject, __in POBJECT_ATTRIBUTES ObjectAttributes, __in BOOLEAN Create, __in BOOLEAN AllowMultipleCallbacks)
Definition: mxgeneralkm.h:318
static __inline NTSTATUS MxUnRegisterPlugPlayNotification(__in __drv_freesMem(Pool) PVOID NotificationEntry)
Definition: mxgeneralkm.h:748
static __inline VOID MxFlushQueuedDpcs()
Definition: mxgeneralkm.h:589
static __inline BOOLEAN IsKM()
Definition: mxgeneralkm.h:53
static __inline VOID MxDereferenceObject(__in PVOID Object)
Definition: mxgeneralkm.h:247
static __inline VOID MxDeleteNPagedLookasideList(_In_ PNPAGED_LOOKASIDE_LIST LookasideList)
Definition: mxgeneralkm.h:433
static __inline NTSTATUS MxCreateSymbolicLink(_In_ PUNICODE_STRING SymbolicLinkName, _In_ PUNICODE_STRING DeviceName)
Definition: mxgeneralkm.h:579
static __inline BOOLEAN MxInsertQueueDpc(__inout PRKDPC Dpc, __in_opt PVOID SystemArgument1, __in_opt PVOID SystemArgument2)
Definition: mxgeneralkm.h:786
__drv_maxIRQL(HIGH_LEVEL) __drv_raisesIRQL(NewIrql) __inline static VOID MxRaiseIrql(__in KIRQL NewIrql
static __inline VOID MxDeleteDevice(_In_ MdDeviceObject Device)
Definition: mxgeneralkm.h:493
static __inline NTSTATUS MxAllocateDriverObjectExtension(_In_ MdDriverObject DriverObject, _In_ PVOID ClientIdentificationAddress, _In_ ULONG DriverObjectExtensionSize, _Post_ _At_(*DriverObjectExtension, _When_(return==0, __drv_aliasesMem __drv_allocatesMem(Mem) _Post_notnull_)) _When_(return==0, _Outptr_result_bytebuffer_(DriverObjectExtensionSize)) PVOID *DriverObjectExtension)
Definition: mxgeneralkm.h:396
static __inline VOID MxQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
Definition: mxgeneralkm.h:679
static __inline MxThread MxGetCurrentThread()
Definition: mxgeneralkm.h:61
static __inline ULONG MxQueryTimeIncrement()
Definition: mxgeneralkm.h:125
__drv_maxIRQL(HIGH_LEVEL) __inline static VOID MxLowerIrql(__in __drv_restoresIRQL __drv_nonConstant KIRQL NewIrql)
static __inline VOID MxReferenceObject(__in PVOID Object)
Definition: mxgeneralkm.h:238
static __inline KIRQL MxGetCurrentIrql()
Definition: mxgeneralkm.h:86
static __inline VOID MxInitializeNPagedLookasideList(_Out_ PNPAGED_LOOKASIDE_LIST Lookaside, _In_opt_ PALLOCATE_FUNCTION Allocate, _In_opt_ PFREE_FUNCTION Free, _In_ ULONG Flags, _In_ SIZE_T Size, _In_ ULONG Tag, _In_ USHORT Depth)
Definition: mxgeneralkm.h:451
static __inline BOOLEAN IsUM()
Definition: mxgeneralkm.h:45
static __inline VOID MxBuildMdlForNonPagedPool(__inout PMDL Mdl)
Definition: mxgeneralkm.h:376
static __inline NTSTATUS MxClose(__in HANDLE Handle)
Definition: mxgeneralkm.h:758
static __inline PVOID RegisterCallback(__in PCALLBACK_OBJECT CallbackObject, __in MdCallbackFunction CallbackFunction, __in PVOID CallbackContext)
Definition: mxgeneralkm.h:334
static __inline PVOID MxGetSystemAddressForMdlSafe(__inout PMDL Mdl, __in ULONG Priority)
Definition: mxgeneralkm.h:366
static DECLSPEC_NORETURN VOID MxBugCheckEx(__in ULONG BugCheckCode, __in ULONG_PTR BugCheckParameter1, __in ULONG_PTR BugCheckParameter2, __in ULONG_PTR BugCheckParameter3, __in ULONG_PTR BugCheckParameter4)
Definition: mxgeneralkm.h:133
static VOID MxDbgPrint(__drv_formatString(printf) __in PCSTR DebugMessage,...)
Definition: mxgeneralkm.cpp:7
static __inline VOID MxDelayExecutionThread(__in KPROCESSOR_MODE WaitMode, __in BOOLEAN Alertable, __in PLARGE_INTEGER Interval)
Definition: mxgeneralkm.h:209
static __inline MdDeviceObject MxAttachDeviceToDeviceStack(_In_ MdDeviceObject SourceDevice, _In_ MdDeviceObject TargetDevice)
Definition: mxgeneralkm.h:511
static __inline NTSTATUS MxSetDeviceInterfaceState(_In_ PUNICODE_STRING SymbolicLinkName, _In_ BOOLEAN Enable)
Definition: mxgeneralkm.h:608
static __inline VOID MxInitializeMdl(_In_ PMDL MemoryDescriptorList, _In_ PVOID BaseVa, _In_ SIZE_T Length)
Definition: mxgeneralkm.h:643
Definition: bufpool.h:50
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
_Out_ PKIRQL Irql
Definition: csq.h:179
#define __out_opt
Definition: dbghelp.h:65
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define DEVICE_TYPE
Definition: guid.c:10
static const WCHAR Message[]
Definition: register.c:74
LONG MaxLockedMinutes
Definition: lock.c:35
#define __drv_savesIRQL
Definition: driverspecs.h:326
#define __drv_freesMem(kind)
Definition: driverspecs.h:272
#define __drv_formatString(kind)
Definition: driverspecs.h:271
#define __drv_restoresIRQL
Definition: driverspecs.h:322
#define __drv_requiresIRQL(irql)
Definition: driverspecs.h:321
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:257
#define __drv_useCancelIRQL
Definition: driverspecs.h:332
#define __drv_raisesIRQL(irql)
Definition: driverspecs.h:312
#define __drv_nonConstant
Definition: driverspecs.h:306
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
_Must_inspect_result_ _In_ LPCGUID _In_ ULONG _In_ FSRTL_ALLOCATE_ECP_FLAGS _In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK _Inout_ PVOID LookasideList
Definition: fltkernel.h:2554
#define printf
Definition: freeldr.h:94
__in PWDFDEVICE_INIT __in BOOLEAN Exclusive
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
static LPWSTR ClientIdentificationAddress
Definition: hidclass.c:16
macro IMPORT Name endm macro EXPORT Name global &Name endm macro TEXTAREA section rx align endm macro DATAAREA section rw endm macro RODATAAREA section rw endm macro NESTED_ENTRY Name FuncName equ &Name PrologName equ &Name &_Prolog FuncEndName equ &Name &_end global &FuncName align func &FuncName & FuncName
Definition: kxarm.h:221
DeviceType
Definition: mmdrv.h:42
ObjectType
Definition: metafile.c:81
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG TitleIndex
Definition: reg.c:131
#define _Outptr_result_bytebuffer_(size)
Definition: ms_sal.h:472
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Post_notnull_
Definition: ms_sal.h:701
#define _Post_
Definition: ms_sal.h:620
#define _At_(target, annos)
Definition: ms_sal.h:244
#define _Out_
Definition: ms_sal.h:345
#define _When_(expr, annos)
Definition: ms_sal.h:254
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define __deref
Definition: ms_sal.h:2629
CALLBACK_FUNCTION * MdCallbackFunction
Definition: mxgeneralkm.h:35
LPCWSTR MxFuncName
Definition: mxgeneralkm.h:27
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
_In_ ULONG _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
Definition: cmfuncs.h:94
_In_ PVOID _In_ BOOLEAN Alertable
Definition: exfuncs.h:453
DWORD Interval
Definition: netstat.c:33
ULONG ACCESS_MASK
Definition: nt_native.h:40
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
Definition: reg.c:135
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
IN ULONG IN UCHAR Condition
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
unsigned short USHORT
Definition: pedump.c:61
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _In_ _IRQL_restores_ KIRQL NewIrql
Definition: ke.h:114
Definition: ketypes.h:687
uint32_t * PULONG
Definition: typedefs.h:59
ULONG_PTR SIZE_T
Definition: typedefs.h:80
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
static int Link(const char **args)
Definition: vfdcmd.c:2414
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ CONST GUID _In_opt_ PCUNICODE_STRING ReferenceString
Definition: wdfdevice.h:3630
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
Definition: wdfdevice.h:3739
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ PWDFDEVICE_INIT _In_ CONST GUID * DeviceClassGuid
Definition: wdfdevice.h:3336
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_In_ WDFDEVICE _In_ ULONG DeviceCharacteristics
Definition: wdfdevice.h:2775
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:655
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:379
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_opt_ ULONG _Out_ WDFLOOKASIDE * Lookaside
Definition: wdfmemory.h:414
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
Definition: wmitypes.h:60
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_opt_ PALLOCATE_FUNCTION Allocate
Definition: exfuncs.h:814
_In_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ BOOLEAN AllowMultipleCallbacks
Definition: exfuncs.h:750
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:819
_In_ PCALLBACK_FUNCTION CallbackFunction
Definition: exfuncs.h:1034
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST * PNPAGED_LOOKASIDE_LIST
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST * PPAGED_LOOKASIDE_LIST
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT SourceDevice
Definition: iofuncs.h:690
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:691
_In_ CONST GUID * InterfaceClassGuid
Definition: iofuncs.h:1136
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE _Inout_opt_ __drv_aliasesMem PVOID _Outptr_result_nullonfailure_ _At_ * NotificationEntry(return==0, __drv_allocatesMem(Mem))) PVOID *NotificationEntry
_Inout_ PMDL TargetMdl
Definition: iofuncs.h:730
_In_ ULONG _In_ ULONG _In_ ULONG HighWatermark
Definition: iofuncs.h:1069
_In_ ULONG AllocateTag
Definition: iofuncs.h:1067
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:676
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:677
_Inout_ PMDL MemoryDescriptorList
Definition: mmfuncs.h:405
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:396
_In_ ACCESS_MASK _In_opt_ POBJECT_TYPE _In_ KPROCESSOR_MODE _Out_ PVOID _Out_opt_ POBJECT_HANDLE_INFORMATION HandleInformation
Definition: obfuncs.h:44
char * LPSTR
Definition: xmlstorage.h:182