ReactOS  0.4.15-dev-1636-gf634010
fxcollectionapi.cpp File Reference
#include "fxsupportpch.hpp"
Include dependency graph for fxcollectionapi.cpp:

Go to the source code of this file.

Functions

_Must_inspect_result_ __drv_maxIRQL (DISPATCH_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfCollectionCreate)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 if (NT_SUCCESS(FxValidateObjectAttributesForParentHandle(pFxDriverGlobals, CollectionAttributes)))
 
 FxPointerNotNull (pFxDriverGlobals, Collection)
 
 if (!NT_SUCCESS(status))
 
 if (pCollection !=NULL)
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *)&pCollection)
 
pCollection Unlock (irql)
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *) &pCollection, &pFxDriverGlobals)
 
 FxObjectHandleGetPtr (pFxDriverGlobals, Object, FX_TYPE_OBJECT,(PVOID *) &pObject)
 
 if (pEntry !=NULL)
 
 if (pObject !=NULL)
 
 FxObjectHandleGetPtr (pFxDriverGlobals, Item, FX_TYPE_OBJECT,(PVOID *) &pObject)
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *) &pCollection)
 
 if (pObject==NULL)
 
return pObject GetObjectHandle ()
 

Variables

_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES CollectionAttributes
 
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFCOLLECTION * Collection
 
PFX_DRIVER_GLOBALS pFxDriverGlobals = GetFxDriverGlobals(DriverGlobals)
 
NTSTATUS status = FxValidateObjectAttributes(pFxDriverGlobals, CollectionAttributes)
 
FxCollectionpCollection
 
WDFCOLLECTION hCol
 
 else
 
KIRQL irql
 
ULONG count = pCollection->Count()
 
_Must_inspect_result_ __in WDFCOLLECTION __in WDFOBJECT Object
 
FxObjectpObject = pCollection->GetItem(Index)
 
__in WDFCOLLECTION __in ULONG Index
 
FxCollectionEntrypEntry = pCollection->FindEntry(Index)
 
__in WDFCOLLECTION __in WDFOBJECT Item
 

Function Documentation

◆ __drv_maxIRQL()

◆ FxObjectHandleGetPtr() [1/4]

FxObjectHandleGetPtr ( GetFxDriverGlobals(DriverGlobals ,
Collection  ,
FX_TYPE_COLLECTION  ,
(PVOID *)&  pCollection 
)

◆ FxObjectHandleGetPtr() [2/4]

FxObjectHandleGetPtr ( pFxDriverGlobals  ,
Object  ,
FX_TYPE_OBJECT  ,
(PVOID *) &  pObject 
)

◆ FxObjectHandleGetPtr() [3/4]

FxObjectHandleGetPtr ( pFxDriverGlobals  ,
Item  ,
FX_TYPE_OBJECT  ,
(PVOID *) &  pObject 
)

◆ FxObjectHandleGetPtr() [4/4]

FxObjectHandleGetPtr ( GetFxDriverGlobals(DriverGlobals ,
Collection  ,
FX_TYPE_COLLECTION  ,
(PVOID *) &  pCollection 
)

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Collection  ,
FX_TYPE_COLLECTION  ,
(PVOID *) &  pCollection,
pFxDriverGlobals 
)

Referenced by if().

◆ FxPointerNotNull()

FxPointerNotNull ( pFxDriverGlobals  ,
Collection   
)

◆ GetObjectHandle()

return pObject GetObjectHandle ( )

Referenced by _Releases_lock_(), and if().

◆ if() [1/6]

Definition at line 60 of file fxcollectionapi.cpp.

61  {
63 
67  (PVOID*)&pParent,
69  }
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *) &pCollection, &pFxDriverGlobals)
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES CollectionAttributes
PFX_DRIVER_GLOBALS pFxDriverGlobals
WDFOBJECT ParentObject
Definition: wdfobject.h:130
FxObject * pParent
Definition: fxdpcapi.cpp:86

◆ if() [2/6]

if ( NT_SUCCESSstatus)

Definition at line 76 of file fxcollectionapi.cpp.

76  {
77  return status;
78  }
NTSTATUS status

◆ if() [3/6]

if ( pCollection = NULL)

Definition at line 83 of file fxcollectionapi.cpp.

83  {
85 
86  if (NT_SUCCESS(status)) {
87  *Collection = hCol;
88  }
89  else {
91  "Could not create collection object: %!STATUS!",
92  status);
93 
95  }
96  }
WDFCOLLECTION hCol
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ WDFCOLLECTION Collection
Definition: wdfregistry.h:367
FxCollection * pCollection
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES CollectionAttributes
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
#define TRACINGERROR
Definition: dbgtrace.h:63
Definition: ps.c:97

◆ if() [4/6]

if ( pEntry = NULL)

Definition at line 205 of file fxcollectionapi.cpp.

205  {
209  }
FxCollection * pCollection
FxObject * m_Object
FxCollectionEntry * pEntry
VOID CleanupEntry(__in FxCollectionEntry *Entry)
#define STATUS_SUCCESS
Definition: shellext.h:65
FxObject * pObject
Definition: ps.c:97

◆ if() [5/6]

if ( pObject = NULL)

Definition at line 217 of file fxcollectionapi.cpp.

217  {
219  }
FxCollection * pCollection
VOID CleanupEntryObject(__in FxObject *Object)
FxObject * pObject

◆ if() [6/6]

if ( pObject  = NULL)

Definition at line 316 of file fxcollectionapi.cpp.

316  {
317  return NULL;
318  }
#define NULL
Definition: types.h:112

◆ Unlock()

pCollection Unlock ( irql  )

Variable Documentation

◆ Collection

__in WDFCOLLECTION Collection
Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 47 of file fxcollectionapi.cpp.

◆ CollectionAttributes

Definition at line 43 of file fxcollectionapi.cpp.

Referenced by if().

◆ count

Definition at line 121 of file fxcollectionapi.cpp.

◆ else

else
Initial value:
{
"Could not create collection object: "
"STATUS_INSUFFICIENT_RESOURCES" )
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define TRACINGERROR
Definition: dbgtrace.h:63

Definition at line 97 of file fxcollectionapi.cpp.

◆ hCol

WDFCOLLECTION hCol

Definition at line 53 of file fxcollectionapi.cpp.

Referenced by if().

◆ Index

__in WDFCOLLECTION __in ULONG Index
Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 185 of file fxcollectionapi.cpp.

◆ irql

Definition at line 120 of file fxcollectionapi.cpp.

◆ Item

__in WDFCOLLECTION __in WDFOBJECT Item
Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 241 of file fxcollectionapi.cpp.

◆ Object

Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 147 of file fxcollectionapi.cpp.

◆ pCollection

FxCollection * pCollection
Initial value:
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES CollectionAttributes
PFX_DRIVER_GLOBALS pFxDriverGlobals

Definition at line 52 of file fxcollectionapi.cpp.

Referenced by if().

◆ pEntry

Definition at line 190 of file fxcollectionapi.cpp.

Referenced by if().

◆ pFxDriverGlobals

Definition at line 50 of file fxcollectionapi.cpp.

Referenced by if().

◆ pObject

pObject = pCollection->GetItem(Index)

Definition at line 152 of file fxcollectionapi.cpp.

Referenced by if().

◆ status