ReactOS  0.4.15-dev-2352-g3fa57b8
fxobjectapi.cpp File Reference
#include "fxobjectpch.hpp"
Include dependency graph for fxobjectapi.cpp:

Go to the source code of this file.

Functions

 __drv_maxIRQL (DISPATCH_LEVEL) WDFAPI VOID STDCALL WDFEXPORT(WdfObjectReferenceActual)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxPointerNotNull (GetFxDriverGlobals(DriverGlobals), Object)
 
FxCallbackLockFxGetCallbackLock (FxObject *Object)
 
__in _Requires_lock_not_held_ (_Curr_) _Acquires_lock_(_Curr_) WDFOBJECT Object)
 
__in _Requires_lock_held_ (_Curr_) _Releases_lock_(_Curr_) WDFOBJECT Object)
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Object, FX_TYPE_OBJECT,(PVOID *)&pObject, &pFxDriverGlobals)
 
 if (pObject->IsNoDeleteDDI())
 
_Must_inspect_result_ __in WDFOBJECT __in CONST GUID __in ULONG __out_bcount (QueryBufferLength) PVOID QueryBuffer)
 

Variables

__in WDFOBJECT Object
 
__in WDFOBJECT __in_opt PVOID Tag
 
__in WDFOBJECT __in_opt PVOID __in LONG Line
 
__in WDFOBJECT __in_opt PVOID __in LONG __in PSTR File
 
PFX_DRIVER_GLOBALS pFxDriverGlobals
 
FxObjectpObject
 
 else
 
_Must_inspect_result_ __in WDFOBJECT __in CONST GUIDGuid
 
_Must_inspect_result_ __in WDFOBJECT __in CONST GUID __in ULONG QueryBufferLength
 

Function Documentation

◆ __drv_maxIRQL()

__drv_maxIRQL ( DISPATCH_LEVEL  )

◆ __out_bcount()

Definition at line 340 of file fxobjectapi.cpp.

371 {
372  DDI_ENTRY();
373 
374  FxObject* p;
375 
377  Object,
379  (PVOID*)&p);
380 
381  return FxObject::_ObjectQuery(p,
382  Guid,
384  QueryBuffer);
385 }
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
DriverGlobals
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID _In_ ULONG QueryBufferLength
Definition: wdfobject.h:760
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:760
static _Must_inspect_result_ NTSTATUS _ObjectQuery(_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
Definition: fxobjectkm.cpp:39
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
GLfloat GLfloat p
Definition: glext.h:8902

◆ _Requires_lock_held_()

__in _Requires_lock_held_ ( _Curr_  )

Definition at line 240 of file fxobjectapi.cpp.

244 {
245  DDI_ENTRY();
246 
248  FxObject* pObject;
250 
252  Object,
254  (PVOID*)&pObject,
256 
257  //
258  // If Lock Verifier on, validate whether its correct to
259  // make this call
260  //
262  //
263  // Check IRQL Level, etc.
264  //
265  }
266 
267  //
268  // Get the CallbackLock for the object
269  //
271  if (pLock == NULL) {
273  "Invalid to call on WDFOBJECT 0x%p",Object);
277  (ULONG_PTR)Object,
278  (ULONG_PTR)NULL
279  );
280  return;
281  }
282 
283  pLock->Unlock(pLock->m_PreviousIrql);
284 
285  return;
286 }
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
FxObject * pObject
PFX_DRIVER_GLOBALS pFxDriverGlobals
DriverGlobals
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
FxCallbackLock * FxGetCallbackLock(FxObject *Object)
BOOLEAN FxVerifierLock
Definition: fxglobals.h:451
#define TRACINGDEVICE
Definition: dbgtrace.h:58
FxSpinLock * pLock
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Object, FX_TYPE_OBJECT,(PVOID *)&pObject, &pFxDriverGlobals)
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
FxVerifierDbgBreakPoint(pFxDriverGlobals)

◆ _Requires_lock_not_held_()

__in _Requires_lock_not_held_ ( _Curr_  )

Definition at line 180 of file fxobjectapi.cpp.

184 {
185  DDI_ENTRY();
186 
187  FxObject* pObject;
190  KIRQL irql;
191 
193  Object,
195  (PVOID*)&pObject,
197 
198  //
199  // If Lock Verifier on, validate whether its correct to
200  // make this call
201  //
203  //
204  // Check IRQL Level, etc.
205  //
206  }
207 
208  //
209  // Get the CallbackLock for the object
210  //
212 
213  if (pLock == NULL) {
215  "Invalid to call on WDFOBJECT 0x%p", Object);
219  (ULONG_PTR)Object,
220  (ULONG_PTR)NULL
221  );
222  return;
223  }
224 
225  pLock->Lock(&irql);
226  pLock->m_PreviousIrql = irql;
227 
228  return;
229 }
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
FxObject * pObject
PFX_DRIVER_GLOBALS pFxDriverGlobals
KIRQL irql
Definition: wave.h:1
DriverGlobals
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
UCHAR KIRQL
Definition: env_spec_w32.h:591
FxCallbackLock * FxGetCallbackLock(FxObject *Object)
BOOLEAN FxVerifierLock
Definition: fxglobals.h:451
#define TRACINGDEVICE
Definition: dbgtrace.h:58
FxSpinLock * pLock
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Object, FX_TYPE_OBJECT,(PVOID *)&pObject, &pFxDriverGlobals)
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
FxVerifierDbgBreakPoint(pFxDriverGlobals)

◆ FxGetCallbackLock()

FxCallbackLock* FxGetCallbackLock ( FxObject Object)

Definition at line 129 of file fxobjectapi.cpp.

153 {
155  IFxHasCallbacks* ihcb;
157 
158  ihcb = NULL;
159 
160  //
161  // Query the object for the IFxHasCallbacks interface. Objects that
162  // have callback locks must support this interface.
163  //
164  status = Object->QueryInterface(&params);
165  if (!NT_SUCCESS(status)) {
166  return NULL;
167  }
168 
169  return ihcb->GetCallbackLockPtr(NULL);
170 }
virtual _Must_inspect_result_ FxCallbackLock * GetCallbackLockPtr(__out_opt FxObject **LockObject)=0
LONG NTSTATUS
Definition: precomp.h:26
GLenum const GLfloat * params
Definition: glext.h:5645
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define NULL
Definition: types.h:112
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by _Requires_lock_held_(), and _Requires_lock_not_held_().

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Object  ,
FX_TYPE_OBJECT  ,
(PVOID *)&  pObject,
pFxDriverGlobals 
)

◆ FxPointerNotNull()

FxPointerNotNull ( GetFxDriverGlobals(DriverGlobals ,
Object   
)

◆ if()

if ( pObject->  IsNoDeleteDDI())

Definition at line 313 of file fxobjectapi.cpp.

313  {
316  "Attempt to Delete an Object Which does not allow WdfDeleteObject "
317  "Handle 0x%p, %!STATUS!",
320  }
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define TRACINGDEVICE
Definition: dbgtrace.h:58
#define STATUS_CANNOT_DELETE
Definition: shellext.h:71
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxVerifierDbgBreakPoint(pFxDriverGlobals)

Variable Documentation

◆ else

else
Initial value:
{
virtual VOID DeleteObject(VOID)
FxObject * pObject

Definition at line 321 of file fxobjectapi.cpp.

◆ File

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

Definition at line 69 of file fxobjectapi.cpp.

◆ Guid

◆ Line

Definition at line 44 of file fxobjectapi.cpp.

◆ Object

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

Definition at line 44 of file fxobjectapi.cpp.

◆ pFxDriverGlobals

PFX_DRIVER_GLOBALS pFxDriverGlobals

Definition at line 301 of file fxobjectapi.cpp.

Referenced by _Requires_lock_held_(), _Requires_lock_not_held_(), and if().

◆ pObject

FxResourceCm * pObject

Definition at line 302 of file fxobjectapi.cpp.

Referenced by FxUserObject::_Create(), FxDisposeList::_Create(), FxSystemWorkItem::_Create(), FxObject::_DereferenceActual(), FxObject::_ReferenceActual(), _Requires_lock_held_(), _Requires_lock_not_held_(), ATL::CAtlWinModule::AddCreateWndData(), AlignedFree(), ATL::AtlWinModuleAddCreateWndData(), CBDADeviceControl_fnConstructor(), CBDAPinControl_fnConstructor(), ATL::CContainedWindowT< TBase, TWinTraits >::CContainedWindowT(), client_free_handle(), client_get_handle(), copy_handle(), CoSwitchCallContext(), CKsProxy::CreateClockInstance(), CRYPT_CacheURL(), CRYPT_CreateAny(), CRYPT_CreateBlob(), CRYPT_CreateCert(), CRYPT_CreateContext(), CRYPT_CreateCRL(), CRYPT_CreateCTL(), CRYPT_CreatePKCS7(), CRYPT_DownloadObject(), CRYPT_FreeBlob(), CRYPT_GetObjectFromCache(), CRYPT_GetObjectFromFile(), DdAllocateObject(), DdFreeObject(), DdHmgAlloc(), DECLARE_INTERFACE_(), destroy_hash(), destroy_key(), FxDisposeList::DrainListLocked(), DRIVEROBJ_vCleanup(), File_RetrieveEncodedObjectW(), FxDpc::FlushAndRundown(), FxTimer::FlushAndRundown(), FxWorkItem::FlushAndRundown(), FxInterrupt::FlushAndRundown(), FTP_RetrieveEncodedObjectW(), FxObjectHandleGetGlobals(), FxObjectHandleGetPtr(), FxObjectHandleGetPtrOffset(), FxCmResList::GetDescriptor(), HTTP_RetrieveEncodedObjectW(), IWICStreamImpl_InitializeFromIStreamRegion(), IWICStreamImpl_InitializeFromMemory(), CKsAllocator::KsCreateAllocatorAndGetHandle(), NdrMesTypeDecode2(), NdrMesTypeEncode2(), NdrMesTypeFree2(), new_object(), NtGdiCreateClientObj(), PerfEvtDeviceD0EntryStart(), PerfEvtDeviceD0ExitStart(), PerfEvtDevicePrepareHardwareStart(), PerfEvtDeviceReleaseHardwareStart(), PerfEvtIoStopStart(), PerfEvtIoStopStop(), PerfIoComplete(), PerfIoStart(), PerformanceAnalysisPowerProcess(), PerformanceGetDriverDeviceAdd(), release_handle(), FxResourceCollection::RemoveAndDelete(), RxFreeObject(), CKsProxy::SetPinState(), CKsProxy::SetSyncSource(), stream_initialize_from_filehandle(), StreamImpl_Create(), test_default_handler(), test_handler_marshaling(), test_inproc_handler(), test_OleCreate(), test_OleLoad(), Test_OneParamRoutine_MapDesktopObject(), test_ROT_multiple_entries(), VfAddContextToHandle(), VfWdfObjectGetTypedContext(), and WdfCxVerifierKeBugCheck().

◆ QueryBufferLength

◆ Tag

Definition at line 44 of file fxobjectapi.cpp.