ReactOS 0.4.15-dev-7834-g00c4b3d
fxdevicefdoapi.cpp File Reference
#include "fxcorepch.hpp"
Include dependency graph for fxdevicefdoapi.cpp:

Go to the source code of this file.

Functions

_Must_inspect_result_ __drv_maxIRQL (DISPATCH_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfFdoAddStaticChild)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
 
 if (pFdo->IsLegacy()||pFdo->IsFdo()==FALSE)
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Child, FX_TYPE_DEVICE,(PVOID *)&pPdo)
 
 if (pPdo->IsLegacy()||pPdo->IsPdo()==FALSE)
 
 if (NT_SUCCESS(status))
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pDevice, &pFxDriverGlobals)
 
 if (pDevice->IsLegacy()||(pDevice->IsFdo()==FALSE))
 
 if (Flags==0||(Flags &~WdfRetrieveAllChildren) !=0)
 
_Must_inspect_result_ __drv_maxIRQL (PASSIVE_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfFdoQueryForInterface)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE_BASE,(PVOID *)&pDeviceBase, &pFxDriverGlobals)
 
 FxPointerNotNull (pFxDriverGlobals, InterfaceType)
 
 FxPointerNotNull (pFxDriverGlobals, Interface)
 
 if (!NT_SUCCESS(status))
 
 if (NT_SUCCESS(pDeviceBase->QueryInterface(&params)))
 
return pDeviceBase QueryForInterface (InterfaceType, Interface, Size, Version, InterfaceSpecificData)
 
 if (pPkgFdo->m_DefaultDeviceList !=NULL)
 

Variables

_Must_inspect_result_ __in WDFDEVICE Fdo
 
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE Child
 
FxDevicepFdo
 
FxDevicepPdo
 
FxPkgFdopPkgFdo = pFdo->GetFdoPkg()
 
NTSTATUS status = pPkgFdo->m_StaticDeviceList->Add(&description.Header, NULL, NULL)
 
description Header IdentificationDescriptionSize = sizeof(description)
 
description Pdo = pPdo
 
WDF_CHILD_LIST_ITERATOR iterator
 
FxDevicepDevice = NULL
 
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE PreviousChild
 
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE __in ULONG Flags
 
WDFDEVICE next = pPkgFdo->m_StaticDeviceList->GetNextStaticDevice(PreviousChild, Flags)
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID InterfaceType
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE Interface
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE __in USHORT Size
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE __in USHORT __in USHORT Version
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE __in USHORT __in USHORT __in_opt PVOID InterfaceSpecificData
 
FxDeviceBasepDeviceBase
 
FxQueryInterfaceParams params = { (PVOID*) &pDevice, FX_TYPE_DEVICE, 0 }
 
 else
 
return NULL
 

Function Documentation

◆ __drv_maxIRQL() [1/2]

◆ __drv_maxIRQL() [2/2]

_Must_inspect_result_ __drv_maxIRQL ( PASSIVE_LEVEL  )

◆ FxObjectHandleGetPtr() [1/2]

FxObjectHandleGetPtr ( GetFxDriverGlobals(DriverGlobals ,
Child  ,
FX_TYPE_DEVICE  ,
(PVOID *)&  pPdo 
)

◆ FxObjectHandleGetPtr() [2/2]

◆ FxObjectHandleGetPtrAndGlobals() [1/2]

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Fdo  ,
FX_TYPE_DEVICE  ,
(PVOID *)&  pDevice,
pFxDriverGlobals 
)

◆ FxObjectHandleGetPtrAndGlobals() [2/2]

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Fdo  ,
FX_TYPE_DEVICE_BASE  ,
(PVOID *)&  pDeviceBase,
pFxDriverGlobals 
)

◆ FxPointerNotNull() [1/2]

FxPointerNotNull ( pFxDriverGlobals  ,
Interface   
)

◆ FxPointerNotNull() [2/2]

FxPointerNotNull ( pFxDriverGlobals  ,
InterfaceType   
)

◆ if() [1/8]

if ( NT_SUCCESSstatus)

Definition at line 378 of file fxdevicefdoapi.cpp.

378 {
379 return status;
380 }
NTSTATUS status

◆ if() [2/8]

if ( Flags  = = 0 || (Flags & ~WdfRetrieveAllChildren) != 0)

Definition at line 234 of file fxdevicefdoapi.cpp.

234 {
237 "Invalid Flags 0x%x", Flags);
239 return NULL;
240 }
#define TRACINGDEVICE
Definition: dbgtrace.h:58
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
return NULL
FxVerifierDbgBreakPoint(pFxDriverGlobals)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

◆ if() [3/8]

Definition at line 385 of file fxdevicefdoapi.cpp.

385 {
386 //
387 // Verify type
388 //
389 if (pDevice->IsLegacy() || (pDevice->IsFdo() == FALSE)) {
391
394 "WDFDEVICE 0x%p Device is either legacy or is not a Fdo %!STATUS!",
395 Fdo, status);
396
397 return status;
398 }
399 }
__inline BOOLEAN IsLegacy(VOID)
Definition: fxdevice.hpp:1209
__inline BOOLEAN IsFdo(VOID)
Definition: fxdevice.hpp:1227
#define FALSE
Definition: types.h:117
FxDevice * pDevice
Definition: ps.c:97
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _In_ WDFDEVICE Fdo
Definition: wdffdo.h:461

◆ if() [4/8]

if ( NT_SUCCESS(status )

Definition at line 116 of file fxdevicefdoapi.cpp.

116 {
118 }
virtual VOID SetDeviceTelemetryInfoFlags(_In_ FxDeviceInfoFlags Flag)
Definition: fxdevice.hpp:1807
FxDevice * pFdo
@ DeviceInfoHasStaticChildren

◆ if() [5/8]

if ( pDevice->  IsLegacy)||(pDevice->IsFdo()==FALSE)

Definition at line 162 of file fxdevicefdoapi.cpp.

162 {
165 "Invalid WDFDEVICE %p is not an FDO", Fdo);
167 return;
168 }

◆ if() [6/8]

if ( pFdo->  IsLegacy)||pFdo->IsFdo( = FALSE)

Definition at line 78 of file fxdevicefdoapi.cpp.

78 {
80
83 "WDFDEVICE 0x%p is either legacy or is not a Fdo, %!STATUS!",
84 Fdo, status);
85
86 return status;
87 }
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734

◆ if() [7/8]

if ( pPdo->  IsLegacy)||pPdo->IsPdo( = FALSE)

Definition at line 94 of file fxdevicefdoapi.cpp.

94 {
96
99 "WDFDEVICE Child 0x%p is either legacy or is not a PDO, %!STATUS!",
100 Child, status);
101
102 return status;
103 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536

◆ if() [8/8]

if ( pPkgFdo->m_DefaultDeviceList !  = NULL)

Definition at line 458 of file fxdevicefdoapi.cpp.

458 {
459 return (WDFCHILDLIST) pPkgFdo->m_DefaultDeviceList->GetObjectHandle();
460 }
PVOID __inline GetObjectHandle(VOID)
Definition: fxobject.hpp:603
FxChildList * m_DefaultDeviceList
Definition: fxpkgfdo.hpp:40
FxPkgFdo * pPkgFdo

◆ QueryForInterface()

return pDeviceBase QueryForInterface ( InterfaceType  ,
Interface  ,
Size  ,
Version  ,
InterfaceSpecificData   
)

Variable Documentation

◆ Child

_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE Child
Initial value:

Definition at line 46 of file fxdevicefdoapi.cpp.

◆ else

else
Initial value:
{
#define DO_NOTHING()
Definition: mxgeneral.h:32

Definition at line 400 of file fxdevicefdoapi.cpp.

◆ Fdo

__in WDFDEVICE Fdo
Initial value:

Definition at line 44 of file fxdevicefdoapi.cpp.

◆ Flags

Initial value:

Definition at line 193 of file fxdevicefdoapi.cpp.

◆ IdentificationDescriptionSize

◆ Interface

◆ InterfaceSpecificData

◆ InterfaceType

◆ iterator

pPkgFdo m_StaticDeviceList EndIteration & iterator

Definition at line 149 of file fxdevicefdoapi.cpp.

◆ next

return next = pPkgFdo->m_StaticDeviceList->GetNextStaticDevice(PreviousChild, Flags)

Definition at line 223 of file fxdevicefdoapi.cpp.

◆ NULL

return NULL

Definition at line 466 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ params

Definition at line 363 of file fxdevicefdoapi.cpp.

◆ pDevice

FxDevice* pDevice = NULL

Definition at line 150 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ pDeviceBase

FxDeviceBase * pDeviceBase

◆ Pdo

Definition at line 112 of file fxdevicefdoapi.cpp.

◆ pFdo

FxDevice* pFdo

Definition at line 65 of file fxdevicefdoapi.cpp.

Referenced by AddDeviceInternal(), if(), and SerialAddDeviceInternal().

◆ pPdo

◆ pPkgFdo

FxPkgFdo * pPkgFdo = pFdo->GetFdoPkg()

Definition at line 67 of file fxdevicefdoapi.cpp.

Referenced by FxPkgFdo::_PnpFilteredStartDeviceCompletionRoutine(), and if().

◆ PreviousChild

Definition at line 191 of file fxdevicefdoapi.cpp.

◆ Size

◆ status

status = pPkgFdo->m_StaticDeviceList->Add(&description.Header, NULL, NULL)

Definition at line 68 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ Version