ReactOS 0.4.15-dev-5672-gf73ac17
wdfobject.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5_WdfVersionBuild_
6
7Module Name:
8
9 wdfobject.h
10
11Abstract:
12
13 This is the C header for driver frameworks objects
14
15Revision History:
16
17
18--*/
19
20//
21// NOTE: This header is generated by stubwork. Please make any
22// modifications to the corresponding template files
23// (.x or .y) and use stubwork to regenerate the header
24//
25
26#ifndef _WDFOBJECT_H_
27#define _WDFOBJECT_H_
28
29#ifndef WDF_EXTERN_C
30 #ifdef __cplusplus
31 #define WDF_EXTERN_C extern "C"
32 #define WDF_EXTERN_C_START extern "C" {
33 #define WDF_EXTERN_C_END }
34 #else
35 #define WDF_EXTERN_C
36 #define WDF_EXTERN_C_START
37 #define WDF_EXTERN_C_END
38 #endif
39#endif
40
42
43
44
45#if (NTDDI_VERSION >= NTDDI_WIN2K)
46
47//
48// Specifies the highest IRQL level allowed on callbacks
49// to the device driver.
50//
57
58//
59// Specifies the concurrency of callbacks to the device driver
60//
68
69
70
71typedef
72_Function_class_(EVT_WDF_OBJECT_CONTEXT_CLEANUP)
75VOID
77EVT_WDF_OBJECT_CONTEXT_CLEANUP(
78 _In_
80 );
81
82typedef EVT_WDF_OBJECT_CONTEXT_CLEANUP *PFN_WDF_OBJECT_CONTEXT_CLEANUP;
83
84typedef
85_Function_class_(EVT_WDF_OBJECT_CONTEXT_DESTROY)
88VOID
90EVT_WDF_OBJECT_CONTEXT_DESTROY(
91 _In_
93 );
94
95typedef EVT_WDF_OBJECT_CONTEXT_DESTROY *PFN_WDF_OBJECT_CONTEXT_DESTROY;
96
97
99
101 //
102 // Size in bytes of this structure
103 //
105
106 //
107 // Function to call when the object is deleted
108 //
110
111 //
112 // Function to call when the objects memory is destroyed when the
113 // the last reference count goes to zero
114 //
116
117 //
118 // Execution level constraints for Object
119 //
121
122 //
123 // Synchronization level constraint for Object
124 //
126
127 //
128 // Optional Parent Object
129 //
131
132 //
133 // Overrides the size of the context allocated as specified by
134 // ContextTypeInfo->ContextSize
135 //
137
138 //
139 // Pointer to the type information to be associated with the object
140 //
142
144
146VOID
149 )
150{
152 Attributes->Size = sizeof(WDF_OBJECT_ATTRIBUTES);
155}
156
157#define WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE(_attributes, _contexttype) \
158 (_attributes)->ContextTypeInfo = WDF_GET_CONTEXT_TYPE_INFO(_contexttype)->UniqueType
159//
160// VOID
161// FORCEINLINE
162// WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(
163// PWDF_OBJECT_ATTRIBUTES Attributes,
164// <typename>
165// )
166//
167// NOTE: Do not put a ; at the end of the last line. This will require the
168// caller to specify a ; after the call.
169//
170#define WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(_attributes, _contexttype) \
171 WDF_OBJECT_ATTRIBUTES_INIT(_attributes); \
172 WDF_OBJECT_ATTRIBUTES_SET_CONTEXT_TYPE(_attributes, _contexttype)
173
174typedef
177 VOID
178 );
179
180//
181// Since C does not have strong type checking we must invent our own
182//
184 //
185 // The size of this structure in bytes
186 //
188
189 //
190 // String representation of the context's type name, i.e. "DEVICE_CONTEXT"
191 //
193
194 //
195 // The size of the context in bytes. This will be the size of the context
196 // associated with the handle unless
197 // WDF_OBJECT_ATTRIBUTES::ContextSizeOverride is specified.
198 //
200
201 //
202 // If NULL, this structure is the unique type identifier for the context
203 // type. If != NULL, the UniqueType pointer value is the unique type id
204 // for the context type.
205 //
207
208 //
209 // Function pointer to retrieve the context type information structure
210 // pointer from the provider of the context type. This function is invoked
211 // by the client driver's entry point by the KMDF stub after all class
212 // drivers are loaded and before DriverEntry is invoked.
213 //
215
217
218//
219// Converts a type name a unique name in which we can retrieve type specific
220// information.
221//
222#define WDF_TYPE_NAME_TO_TYPE_INFO(_contexttype) \
223 _WDF_ ## _contexttype ## _TYPE_INFO
224
225//
226// Converts a type name a unique name to the structure which will initialize
227// it through an external component.
228//
229#define WDF_TYPE_NAME_TO_EXTERNAL_INIT(_contexttype) \
230 _WDF_ ## _contexttype ## _EXTERNAL_INIT
231
232#define WDF_TYPE_NAME_TO_EXTERNAL_INIT_FUNCTION(_contexttype) \
233 _contexttype ## _EXTERNAL_INIT_FUNCTION
234
235//
236// Returns an address to the type information representing this typename
237//
238#define WDF_GET_CONTEXT_TYPE_INFO(_contexttype) \
239 (&WDF_TYPE_NAME_TO_TYPE_INFO(_contexttype))
240
241//
242// Used to help generate our own usable pointer to the type typedef. For instance,
243// a call as WDF_TYPE_NAME_POINTER_TYPE(DEVICE_CONTEXT) would generate:
244//
245// WDF_POINTER_TYPE_DEVICE_CONTEXT
246//
247// which would be the equivalent of DEVICE_CONTEXT*
248//
249#define WDF_TYPE_NAME_POINTER_TYPE(_contexttype) \
250 WDF_POINTER_TYPE_ ## _contexttype
251
252//
253// Declares a typename so that in can be associated with a handle. This will
254// use the type's name with a _ prepended as the "friendly name" (which results
255// in the autogenerated casting function being named WdfObjectGet_<typename>, ie
256// WdfObjectGet_DEVICE_CONTEXT. See WDF_DECLARE_CONTEXT_TYPE_WITH_NAME for
257// more details on what is generated.
258//
259#define WDF_DECLARE_CONTEXT_TYPE(_contexttype) \
260 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(_contexttype, WdfObjectGet_ ## _contexttype)
261
262//
263// WDF_DECLARE_CONTEXT_TYPE_WITH_NAME performs the following 3 tasks
264//
265// 1) declare a typedef for the context type so that its pointer type can be
266// referred to later
267// 2) declare and initialize global structure that represents the type
268// information for this
269// context type
270// 3) declare and implement a function named _castingfunction
271// which does the proper type conversion.
272//
273// WDF_DECLARE_TYPE_AND_GLOBALS implements 1 & 2
274// WDF_DECLARE_CASTING_FUNCTION implements 3
275//
276// For instance, the invocation of
277// WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(DEVICE_CONTEXT, WdfDeviceGetContext)
278// would result in the following being generated:
279//
280// typedef DEVICE_CONTEXT* WDF_POINTER_TYPE_DEVICE_CONTEXT;
281//
282// extern const __declspec(selectany) WDF_OBJECT_CONTEXT_TYPE_INFO _WDF_DEVICE_CONTEXT_TYPE_INFO =
283// {
284// sizeof(WDF_OBJECT_CONTEXT_TYPE_INFO),
285// "DEVICE_CONTEXT",
286// sizeof(DEVICE_CONTEXT),
287// };
288//
289// WDF_POINTER_TYPE_DEVICE_CONTEXT
290// WdfDeviceGetContext(
291// WDFOBJECT Handle
292// )
293// {
294// return (WDF_POINTER_TYPE_DEVICE_CONTEXT)
295// WdfObjectGetTypedContextWorker(
296// Handle,
297// (&_WDF_DEVICE_CONTEXT_TYPE_INFO)->UniqueType
298// );
299// }
300//
301#define WDF_TYPE_INIT_BASE_SECTION_NAME ".kmdftypeinit"
302#define WDF_TYPE_INIT_SECTION_NAME ".kmdftypeinit$b"
303
304//
305// .data is the default section that global data would be placed into. We
306// cannot just use ".data" in __declspec(allocate()) without first declaring
307// it in a #pragma section() even though it is a default section name.
308//
309#ifndef WDF_TYPE_DEFAULT_SECTION_NAME
310#define WDF_TYPE_DEFAULT_SECTION_NAME ".data"
311#endif // WDF_TYPE_DEFAULT_SECTION_NAME
312
313#pragma section(WDF_TYPE_INIT_SECTION_NAME, read, write)
314#pragma section(WDF_TYPE_DEFAULT_SECTION_NAME)
315
316#define WDF_DECLARE_TYPE_AND_GLOBALS(_contexttype, _UniqueType, _GetUniqueType, _section)\
317 \
318typedef _contexttype* WDF_TYPE_NAME_POINTER_TYPE(_contexttype); \
319 \
320WDF_EXTERN_C \
321DECLSPEC_SELECTANY \
322const WDF_OBJECT_CONTEXT_TYPE_INFO \
323WDF_TYPE_NAME_TO_TYPE_INFO(_contexttype) = \
324{ \
325 sizeof(WDF_OBJECT_CONTEXT_TYPE_INFO), \
326 #_contexttype, \
327 sizeof(_contexttype), \
328 _UniqueType, \
329 _GetUniqueType, \
330}; \
331//__declspec(allocate(_section))
332
333#define WDF_DECLARE_CASTING_FUNCTION(_contexttype, _castingfunction) \
334 \
335WDF_EXTERN_C \
336__drv_aliasesMem \
337FORCEINLINE \
338WDF_TYPE_NAME_POINTER_TYPE(_contexttype) \
339_castingfunction( \
340 _In_ WDFOBJECT Handle \
341 ) \
342{ \
343 return (WDF_TYPE_NAME_POINTER_TYPE(_contexttype)) \
344 WdfObjectGetTypedContextWorker( \
345 Handle, \
346 WDF_GET_CONTEXT_TYPE_INFO(_contexttype)->UniqueType \
347 ); \
348}
349
350#define WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(_contexttype, _castingfunction) \
351 \
352WDF_DECLARE_TYPE_AND_GLOBALS( \
353 _contexttype, \
354 WDF_GET_CONTEXT_TYPE_INFO(_contexttype), \
355 NULL, \
356 WDF_TYPE_DEFAULT_SECTION_NAME) \
357 \
358WDF_DECLARE_CASTING_FUNCTION(_contexttype, _castingfunction)
359
360//
361// WDF_DECLARE_SHARED_CONTEXT_TYPE_WITH_NAME is the same as
362// WDF_DECLARE_CONTEXT_TYPE_WITH_NAME with respect to the types and structures
363// that are created and initialized. The casting function is different in that
364// it passes the UniqueType to WdfObjectGetTypedContextWorker() instead of the
365// global type structure created. It also creates a structure which will contain
366// an initialization function which will be invoked before DriverEntry() is
367// called.
368//
369// It is the responsibilty of the component exporting the unique type to define
370// and implement the function which will return the unique type. The format of
371// the define is:
372//
373// #define _contexttype ## _EXTERNAL_INIT_FUNCTION
374//
375// (e.g. #define DEVICE_CONTEXT_EXTERNALINIT_FUNCTION DeviceContextInit()
376// for a type of DEVICE_CONTEXT)
377//
378#define WDF_DECLARE_SHARED_CONTEXT_TYPE_WITH_NAME(_contexttype, _castingfunction) \
379 \
380WDF_DECLARE_TYPE_AND_GLOBALS( \
381 _contexttype, \
382 NULL, \
383 WDF_TYPE_NAME_TO_EXTERNAL_INIT_FUNCTION(_contexttype), \
384 WDF_TYPE_INIT_SECTION_NAME) \
385 \
386WDF_DECLARE_CASTING_FUNCTION(_contexttype, _castingfunction)
387
388
389//
390// Generic conversion macro from handle to type. This should be used if the
391// autogenerated conversion function does not suite the programmers calling style.
392//
393// The type parameter should be name of the type (e.g. DEVICE_CONTEXT), not the
394// name of the pointer to the type (PDEVICE_CONTEXT).
395//
396// Example call:
397//
398// WDFDEVICE device;
399// PDEVICE_CONTEXT pContext;
400//
401// pContext = WdfObjectGetTypedContext(device, DEVICE_CONTEXT);
402//
403//
404#define WdfObjectGetTypedContext(handle, type) \
405(type*) \
406WdfObjectGetTypedContextWorker( \
407 (WDFOBJECT) handle, \
408 WDF_GET_CONTEXT_TYPE_INFO(type)->UniqueType \
409 )
410
411//
412// Converts a type name to a unique context name.
413//
414#define WDF_CUSTOM_TYPE_CONTEXT_NAME(_type) \
415 WdfCustomType_ ## _type
416
417//
418// Converts a type name to a unique function name to retrieve the type info context.
419//
420#define WDF_GET_CUSTOM_TYPE_FUNCTION_NAME(_type) \
421 WdfObjectGetCustomType_ ## _type
422
423//
424// Converts a type name to a unique function name to add the type info context.
425//
426#define WDF_ADD_CUSTOM_TYPE_FUNCTION_NAME(_type) \
427 WdfObjectAddCustomType_ ## _type
428
429//
430// Core structure for supporting custom types, see macros below.
431//
436
437//
438// Declares a context and a function to handle the specified type.
439//
440// NOTE: Do not put a ; at the end of the last line. This will require the
441// caller to specify a ; after the call.
442//
443#define WDF_DECLARE_CUSTOM_TYPE(_type) \
444 \
445typedef WDF_CUSTOM_TYPE_CONTEXT WDF_CUSTOM_TYPE_CONTEXT_NAME(_type); \
446 \
447WDF_DECLARE_CONTEXT_TYPE_WITH_NAME( \
448 WDF_CUSTOM_TYPE_CONTEXT_NAME(_type), \
449 WDF_GET_CUSTOM_TYPE_FUNCTION_NAME(_type) \
450 ); \
451 \
452WDF_EXTERN_C \
453FORCEINLINE \
454NTSTATUS \
455WDF_ADD_CUSTOM_TYPE_FUNCTION_NAME(_type)( \
456 _In_ WDFOBJECT Handle, \
457 _In_opt_ ULONG_PTR Data, \
458 _In_opt_ PFN_WDF_OBJECT_CONTEXT_CLEANUP EvtCleanupCallback, \
459 _In_opt_ PFN_WDF_OBJECT_CONTEXT_DESTROY EvtDestroyCallback \
460 ) \
461{ \
462 NTSTATUS status; \
463 WDF_OBJECT_ATTRIBUTES attributes; \
464 WDF_CUSTOM_TYPE_CONTEXT_NAME(_type)* typeInfo; \
465 \
466 WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE( \
467 &attributes, \
468 WDF_CUSTOM_TYPE_CONTEXT_NAME(_type)); \
469 \
470 attributes.EvtCleanupCallback = EvtCleanupCallback; \
471 attributes.EvtDestroyCallback = EvtDestroyCallback; \
472 \
473 status = WdfObjectAllocateContext(Handle, \
474 &attributes, \
475 (PVOID*)&typeInfo); \
476 if (NT_SUCCESS(status)) { \
477 typeInfo->Size = sizeof(WDF_CUSTOM_TYPE_CONTEXT_NAME(_type)); \
478 typeInfo->Data = Data; \
479 } \
480 \
481 return status; \
482}
483
484//
485// BOOLEAN
486// WdfObjectIsCustomType(
487// _In_ _handle, // WDFOBJECT handle.
488// _In_ _type // Type.
489// )
490//
491// NOTE: Do not put a ; at the end of the last line. This will require the
492// caller to specify a ; after the call.
493//
494#define WdfObjectIsCustomType(_handle, _type) \
495 (WdfObjectGetTypedContext(_handle, WDF_CUSTOM_TYPE_CONTEXT_NAME(_type)) \
496 == NULL ? FALSE : TRUE)
497
498//
499// NTSTATUS
500// WdfObjectAddCustomTypeWithData(
501// _In_ _handle, // WDFOBJECT handle.
502// _In_ _type, // Type.
503// _In_opt_ _data, // Type's data.
504// _In_opt_ _cleanup, // EvtCleanupCallback
505// _In_opt_ _destroy // EvtDestroyCallback
506// )
507//
508// NOTE: Do not put a ; at the end of the last line. This will require the
509// caller to specify a ; after the call.
510//
511#define WdfObjectAddCustomTypeWithData(_handle, _type, _data, _cleanup, _destroy) \
512 WDF_ADD_CUSTOM_TYPE_FUNCTION_NAME(_type)(_handle, _data, _cleanup, _destroy)
513
514//
515// NTSTATUS
516// WdfObjectAddCustomType(
517// _In_ _handle, // WDFOBJECT handle.
518// _In_ _type // Type.
519// )
520//
521// NOTE: Do not put a ; at the end of the last line. This will require the
522// caller to specify a ; after the call.
523//
524#define WdfObjectAddCustomType(_handle, _type) \
525 WdfObjectAddCustomTypeWithData(_handle, _type, 0, NULL, NULL)
526
527//
528// ULONG_PTR
529// WdfObjectGetCustomTypeData(
530// _In_ _handle, // WDFOBJECT handle.
531// _In_ _type // Type.
532// )
533//
534// NOTE: Do not put a ; at the end of the last line. This will require the
535// caller to specify a ; after the call.
536//
537#define WdfObjectGetCustomTypeData(_handle, _type) \
538 (WDF_GET_CUSTOM_TYPE_FUNCTION_NAME(_type)(_handle)->Data)
539
540
541//
542// WDF Function: WdfObjectGetTypedContextWorker
543//
544typedef
545WDFAPI
548 _In_
550 _In_
552 _In_
554 );
555
557PVOID
559 _In_
561 _In_
563 )
564{
566}
567
568//
569// WDF Function: WdfObjectAllocateContext
570//
571typedef
572WDFAPI
575 _In_
577 _In_
579 _In_
580 PWDF_OBJECT_ATTRIBUTES ContextAttributes,
583 );
584
588 _In_
590 _In_
591 PWDF_OBJECT_ATTRIBUTES ContextAttributes,
594 )
595{
597}
598
599//
600// WDF Function: WdfObjectContextGetObject
601//
602typedef
603WDFAPI
606 _In_
608 _In_
610 );
611
615 _In_
617 )
618{
620}
621
622//
623// WDF Function: WdfObjectReferenceActual
624//
625typedef
626WDFAPI
629 _In_
631 _In_
634 PVOID Tag,
635 _In_
636 LONG Line,
637 _In_z_
638 PCHAR File
639 );
640
642VOID
644 _In_
647 PVOID Tag,
648 _In_
649 LONG Line,
650 _In_z_
651 PCHAR File
652 )
653{
655}
656
657//
658// WDF Function: WdfObjectDereferenceActual
659//
660typedef
661WDFAPI
664 _In_
666 _In_
669 PVOID Tag,
670 _In_
671 LONG Line,
672 _In_z_
673 PCHAR File
674 );
675
677VOID
679 _In_
682 PVOID Tag,
683 _In_
684 LONG Line,
685 _In_z_
686 PCHAR File
687 )
688{
690}
691
692//
693// WDF Function: WdfObjectCreate
694//
695typedef
698WDFAPI
700(STDCALL *PFN_WDFOBJECTCREATE)(
701 _In_
705 _Out_
707 );
708
713WdfObjectCreate(
716 _Out_
718 )
719{
721}
722
723//
724// WDF Function: WdfObjectDelete
725//
726typedef
728WDFAPI
729VOID
730(STDCALL *PFN_WDFOBJECTDELETE)(
731 _In_
733 _In_
735 );
736
739VOID
740WdfObjectDelete(
741 _In_
743 )
744{
746}
747
748//
749// WDF Function: WdfObjectQuery
750//
751typedef
754WDFAPI
756(STDCALL *PFN_WDFOBJECTQUERY)(
757 _In_
759 _In_
761 _In_
763 _In_
766 PVOID QueryBuffer
767 );
768
773WdfObjectQuery(
774 _In_
776 _In_
777 CONST GUID* Guid,
778 _In_
781 PVOID QueryBuffer
782 )
783{
784 return ((PFN_WDFOBJECTQUERY) WdfFunctions[WdfObjectQueryTableIndex])(WdfDriverGlobals, Object, Guid, QueryBufferLength, QueryBuffer);
785}
786
787
788
789//
790// Reference an object
791//
792// VOID
793// WdfObjectReference(
794// _In_ WDFOBJECT Handle
795// );
796//
797// VOID
798// WdfObjectReferenceWithTag(
799// _In_ WDFOBJECT Handle,
800// _In_ PVOID Tag
801// );
802//
803#define WdfObjectReference(Handle) \
804 WdfObjectReferenceWithTag(Handle, NULL)
805
806#define WdfObjectReferenceWithTag(Handle, Tag) \
807 WdfObjectReferenceActual(Handle, Tag, __LINE__, __FILE__)
808
809
810//
811// Dereference an object. If an object allows for a client explicitly deleting
812// it, call WdfObjectDelete. Do not use WdfObjectDereferenceXxx to delete an
813// object.
814//
815// VOID
816// WdfObjectDereference(
817// _In_ WDFOBJECT Handle
818// );
819//
820// VOID
821// WdfObjectDereferenceWithTag(
822// _In_ WDFOBJECT Handle
823// _In_ PVOID Tag
824// );
825//
826#define WdfObjectDereference(Handle) \
827 WdfObjectDereferenceWithTag(Handle, NULL)
828
829#define WdfObjectDereferenceWithTag(Handle, Tag) \
830 WdfObjectDereferenceActual(Handle, Tag, __LINE__, __FILE__)
831
832
833#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
834
835
837
838#endif // _WDFOBJECT_H_
839
#define __cdecl
Definition: accygwin.h:79
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
Definition: File.h:16
#define NTSTATUS
Definition: precomp.h:20
#define _IRQL_requires_same_
Definition: driverspecs.h:232
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
DriverGlobals
ULONG Handle
Definition: gdb_input.c:15
__in WDFOBJECT __in PCWDF_OBJECT_CONTEXT_TYPE_INFO TypeInfo
Definition: handleapi.cpp:601
__in PVOID ContextPointer
Definition: handleapi.cpp:679
#define _Function_class_(x)
Definition: ms_sal.h:2946
#define _In_z_
Definition: ms_sal.h:313
#define _Outptr_opt_
Definition: ms_sal.h:429
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define FASTCALL
Definition: nt_native.h:50
#define CONST
Definition: pedump.c:81
long LONG
Definition: pedump.c:60
Definition: ncftp.h:79
WDFOBJECT ParentObject
Definition: wdfobject.h:130
PFN_WDF_OBJECT_CONTEXT_CLEANUP EvtCleanupCallback
Definition: wdfobject.h:109
WDF_EXECUTION_LEVEL ExecutionLevel
Definition: wdfobject.h:120
WDF_SYNCHRONIZATION_SCOPE SynchronizationScope
Definition: wdfobject.h:125
PCWDF_OBJECT_CONTEXT_TYPE_INFO ContextTypeInfo
Definition: wdfobject.h:141
PFN_WDF_OBJECT_CONTEXT_DESTROY EvtDestroyCallback
Definition: wdfobject.h:115
PFN_GET_UNIQUE_CONTEXT_TYPE EvtDriverGetUniqueContextType
Definition: wdfobject.h:214
PCWDF_OBJECT_CONTEXT_TYPE_INFO UniqueType
Definition: wdfobject.h:206
void * PVOID
Definition: typedefs.h:50
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define STDCALL
Definition: wdf.h:45
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfObjectGetTypedContextWorkerTableIndex
Definition: wdffuncenum.h:227
@ WdfObjectReferenceActualTableIndex
Definition: wdffuncenum.h:230
@ WdfObjectContextGetObjectTableIndex
Definition: wdffuncenum.h:229
@ WdfObjectDeleteTableIndex
Definition: wdffuncenum.h:233
@ WdfObjectCreateTableIndex
Definition: wdffuncenum.h:232
@ WdfObjectAllocateContextTableIndex
Definition: wdffuncenum.h:228
@ WdfObjectQueryTableIndex
Definition: wdffuncenum.h:234
@ WdfObjectDereferenceActualTableIndex
Definition: wdffuncenum.h:231
_Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFOBJECTCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfobject.h:697
FORCEINLINE VOID WdfObjectDereferenceActual(_In_ WDFOBJECT Handle, _In_opt_ PVOID Tag, _In_ LONG Line, _In_z_ PCHAR File)
Definition: wdfobject.h:678
WDFAPI VOID(STDCALL * PFN_WDFOBJECTREFERENCEACTUAL)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ WDFOBJECT Handle, _In_opt_ PVOID Tag, _In_ LONG Line, _In_z_ PCHAR File)
Definition: wdfobject.h:628
struct _WDF_OBJECT_ATTRIBUTES WDF_OBJECT_ATTRIBUTES
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFOBJECT * Object
Definition: wdfobject.h:707
const struct _WDF_OBJECT_CONTEXT_TYPE_INFO * PCWDF_OBJECT_CONTEXT_TYPE_INFO
Definition: wdfobject.h:98
WDFAPI VOID(STDCALL * PFN_WDFOBJECTDEREFERENCEACTUAL)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ WDFOBJECT Handle, _In_opt_ PVOID Tag, _In_ LONG Line, _In_z_ PCHAR File)
Definition: wdfobject.h:663
#define WDF_EXTERN_C_END
Definition: wdfobject.h:37
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition: wdfobject.h:704
FORCEINLINE VOID WDF_OBJECT_ATTRIBUTES_INIT(_Out_ PWDF_OBJECT_ATTRIBUTES Attributes)
Definition: wdfobject.h:147
FORCEINLINE WDFOBJECT WdfObjectContextGetObject(_In_ PVOID ContextPointer)
Definition: wdfobject.h:614
_WDF_SYNCHRONIZATION_SCOPE
Definition: wdfobject.h:61
@ WdfSynchronizationScopeInheritFromParent
Definition: wdfobject.h:63
@ WdfSynchronizationScopeQueue
Definition: wdfobject.h:65
@ WdfSynchronizationScopeNone
Definition: wdfobject.h:66
@ WdfSynchronizationScopeInvalid
Definition: wdfobject.h:62
@ WdfSynchronizationScopeDevice
Definition: wdfobject.h:64
struct _WDF_CUSTOM_TYPE_CONTEXT * PWDF_CUSTOM_TYPE_CONTEXT
_WDF_EXECUTION_LEVEL
Definition: wdfobject.h:51
@ WdfExecutionLevelPassive
Definition: wdfobject.h:54
@ WdfExecutionLevelDispatch
Definition: wdfobject.h:55
@ WdfExecutionLevelInheritFromParent
Definition: wdfobject.h:53
@ WdfExecutionLevelInvalid
Definition: wdfobject.h:52
struct _WDF_OBJECT_CONTEXT_TYPE_INFO * PWDF_OBJECT_CONTEXT_TYPE_INFO
EVT_WDF_OBJECT_CONTEXT_DESTROY * PFN_WDF_OBJECT_CONTEXT_DESTROY
Definition: wdfobject.h:95
WDFAPI NTSTATUS(STDCALL * PFN_WDFOBJECTALLOCATECONTEXT)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ WDFOBJECT Handle, _In_ PWDF_OBJECT_ATTRIBUTES ContextAttributes, _Outptr_opt_ PVOID *Context)
Definition: wdfobject.h:574
WDFAPI PVOID(FASTCALL * PFN_WDFOBJECTGETTYPEDCONTEXTWORKER)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ WDFOBJECT Handle, _In_ PCWDF_OBJECT_CONTEXT_TYPE_INFO TypeInfo)
Definition: wdfobject.h:547
#define WDF_EXTERN_C_START
Definition: wdfobject.h:36
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
struct _WDF_CUSTOM_TYPE_CONTEXT WDF_CUSTOM_TYPE_CONTEXT
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID _In_ ULONG _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
Definition: wdfobject.h:765
struct _WDF_OBJECT_CONTEXT_TYPE_INFO WDF_OBJECT_CONTEXT_TYPE_INFO
WDFAPI WDFOBJECT(FASTCALL * PFN_WDFOBJECTCONTEXTGETOBJECT)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ PVOID ContextPointer)
Definition: wdfobject.h:605
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID _In_ ULONG QueryBufferLength
Definition: wdfobject.h:764
FORCEINLINE VOID WdfObjectReferenceActual(_In_ WDFOBJECT Handle, _In_opt_ PVOID Tag, _In_ LONG Line, _In_z_ PCHAR File)
Definition: wdfobject.h:643
FORCEINLINE PVOID WdfObjectGetTypedContextWorker(_In_ WDFOBJECT Handle, _In_ PCWDF_OBJECT_CONTEXT_TYPE_INFO TypeInfo)
Definition: wdfobject.h:558
PCWDF_OBJECT_CONTEXT_TYPE_INFO(__cdecl * PFN_GET_UNIQUE_CONTEXT_TYPE)(VOID)
Definition: wdfobject.h:176
FORCEINLINE NTSTATUS WdfObjectAllocateContext(_In_ WDFOBJECT Handle, _In_ PWDF_OBJECT_ATTRIBUTES ContextAttributes, _Outptr_opt_ PVOID *Context)
Definition: wdfobject.h:587
EVT_WDF_OBJECT_CONTEXT_CLEANUP * PFN_WDF_OBJECT_CONTEXT_CLEANUP
Definition: wdfobject.h:82
WDF_EXTERN_C_START enum _WDF_EXECUTION_LEVEL WDF_EXECUTION_LEVEL
enum _WDF_SYNCHRONIZATION_SCOPE WDF_SYNCHRONIZATION_SCOPE
struct _WDF_OBJECT_ATTRIBUTES * PWDF_OBJECT_ATTRIBUTES
#define WDFAPI
Definition: wdftypes.h:53
#define FORCEINLINE
Definition: wdftypes.h:67
HANDLE WDFOBJECT
Definition: wdftypes.h:114