43 if (
DeviceInit->Fdo.EventCallbacks.EvtDeviceFilterAddResourceRequirements !=
NULL &&
44 DeviceInit->Fdo.EventCallbacks.EvtDeviceRemoveAddedResources ==
NULL) {
50 "Must set EvtDeviceRemoveAddedResources if "
51 "EvtDeviceFilterAddResourceRequirements (%p) is set",
52 DeviceInit->Fdo.EventCallbacks.EvtDeviceFilterAddResourceRequirements);
120 if (
DeviceInit->Fdo.EventCallbacks.Size != 0) {
271 if (
DeviceInit->Pdo.EventCallbacks.Size != 0) {
353 "Deleting !devobj %p, WDFDEVICE %p, attached to !devobj %p",
538 "WDFDEVICE %p has no device name (use WdfDeviceInitAssignName), "
553 "WDFDEVICE %p has not yet been reported to pnp, cannot call "
570 "WDFDEVICE %p IoGetDeviceProperty failed %!STATUS!",
579 "WDFDEVICE %p PDO name too long (%d, max is %d), %!STATUS!",
592 "WDFDEVICE %p PDO name length is zero, %!STATUS!",
604 "WDFDEVICE %p could not allocate buffer for PDO name, %!STATUS!",
624 "WDFDEVICE %p IoGetDeviceProperty failed second time, %!STATUS!",
645 "WDFDEVICE %p allocate buffer for symbolic name failed, %!STATUS!",
660 "WDFDEVICE %p create sybolic link failed, %!STATUS!",
690 lcid = deviceData->
Lcid;
702 "WDFDEVICE %p is not yet known to PnP manager, cannot call "
703 "WdfDeviceAssignPropertyEx in this state, %!STATUS!",
709 status = IoSetDevicePropertyData(
722 "WDFDEVICE %p failed to assign device property, %!STATUS!",
768 pdo =
Device->GetSafePhysicalDevice();
776 "WDFDEVICE %p is not yet known to PnP manager, cannot open "
777 "PNP registry keys in this state, %!STATUS!",
Device->GetHandle(),
status);
873 ULONG requiredLength = 0;
898 pdo =
Device->GetSafePhysicalDevice();
906 "WDFDEVICE %p is not yet known to PnP manager, cannot query "
907 "device properties in this state, %!STATUS!",
Device->GetHandle(),
status);
914 lcid = deviceData->
Lcid;
916 status = IoGetDevicePropertyData(pdo,
930 "Query for property buffer failed, %!STATUS!",
955 if (RemotePdo !=
NULL) {
970 pdo =
Device->GetSafePhysicalDevice();
978 "WDFDEVICE %p is not yet known to PnP manager, cannot query "
979 "device properties in this state, %!STATUS!",
Device->GetHandle(),
status);
1011 registryKeyPath.
Buffer = baseStringBuffer;
1019 "Unable to create a DEVICEMAP registry path for subkey %S, %!STATUS!",
1032 "WDFKEY open failed, %!STATUS!",
status);
MxDeviceObject m_AttachedDevice
MxDeviceObject m_DeviceObject
MxDeviceObject m_PhysicalDevice
static _Must_inspect_result_ NTSTATUS _QueryProperty(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_opt_ PWDFDEVICE_INIT DeviceInit, _In_opt_ FxDevice *Device, _In_opt_ MdDeviceObject RemotePdo, _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty, _In_ ULONG BufferLength, _Out_opt_ PVOID PropertyBuffer, _Out_opt_ PULONG ResultLength)
__inline BOOLEAN IsPnp(VOID)
virtual _Must_inspect_result_ NTSTATUS AllocateDmaEnablerList(VOID)
NTSTATUS CreateSymbolicLink(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ PCUNICODE_STRING SymbolicLinkName)
UNICODE_STRING m_DeviceName
VOID DeleteSymbolicLink(VOID)
VOID DestructorInternal(VOID)
virtual VOID AddChildList(__inout FxChildList *List)
_Must_inspect_result_ NTSTATUS SetFilter(__in BOOLEAN Value)
__inline FxPkgFdo * GetFdoPkg(VOID)
virtual VOID AddDmaEnabler(__inout FxDmaEnabler *Enabler)
static _Must_inspect_result_ NTSTATUS _QueryPropertyEx(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _In_opt_ PWDFDEVICE_INIT DeviceInit, _In_opt_ FxDevice *Device, _In_ PVOID PropertyData, _In_ FxPropertyType FxPropertyType, _In_ ULONG BufferLength, _Out_ PVOID PropertyBuffer, _Out_ PULONG ResultLength, _Out_ PDEVPROPTYPE PropertyType)
VOID WmiPkgDeregister(VOID)
CfxDevice * m_ParentDevice
MdDeviceObject __inline GetSafePhysicalDevice(VOID)
_Must_inspect_result_ NTSTATUS OpenSettingsKey(__out HANDLE *Key, __in ACCESS_MASK DesiredAccess=STANDARD_RIGHTS_ALL)
UNICODE_STRING m_MofResourceName
_Must_inspect_result_ NTSTATUS PdoInitialize(__in PWDFDEVICE_INIT DeviceInit)
VOID FinishInitializing(VOID)
FxPkgGeneral * m_PkgGeneral
static _Must_inspect_result_ NTSTATUS _ValidateOpenKeyParams(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_opt_ PWDFDEVICE_INIT DeviceInit, _In_opt_ FxDevice *Device)
virtual VOID RemoveDmaEnabler(__inout FxDmaEnabler *Enabler)
VOID InstallPackage(__inout FxPackage *Package)
VOID SetFilterIoType(VOID)
_Must_inspect_result_ NTSTATUS AssignProperty(_In_ PVOID PropertyData, _In_ FxPropertyType FxPropertyType, _In_ DEVPROPTYPE Type, _In_ ULONG BufferLength, _In_opt_ PVOID PropertyBuffer)
__inline BOOLEAN IsLegacy(VOID)
BOOLEAN m_DeviceObjectDeleted
virtual VOID RemoveChildList(__inout FxChildList *List)
NTSTATUS WmiPkgRegister(VOID)
UNICODE_STRING m_SymbolicLinkName
_Must_inspect_result_ NTSTATUS FdoInitialize(__in PWDFDEVICE_INIT DeviceInit)
_Must_inspect_result_ NTSTATUS OpenDevicemapKeyWorker(_In_ PFX_DRIVER_GLOBALS pFxDriverGlobals, _In_ PCUNICODE_STRING KeyName, _In_ ACCESS_MASK DesiredAccess, _In_ FxRegKey *pKey)
_Must_inspect_result_ NTSTATUS CreateDevice(__in PWDFDEVICE_INIT DeviceInit)
BOOLEAN m_PowerPageableCapable
static __inline NTSTATUS _GetDeviceProperty(_In_ MdDeviceObject DeviceObject, _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty, _In_ ULONG BufferLength, _Out_opt_ PVOID PropertyBuffer, _Out_ PULONG ResultLength)
static _Must_inspect_result_ NTSTATUS _OpenKey(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_opt_ PWDFDEVICE_INIT DeviceInit, _In_opt_ FxDevice *Device, _In_ ULONG DeviceInstanceKeyType, _In_ ACCESS_MASK DesiredAccess, _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes, _Out_ WDFKEY *Key)
_Must_inspect_result_ NTSTATUS ControlDeviceInitialize(__in PWDFDEVICE_INIT DeviceInit)
static __inline NTSTATUS _OpenDeviceRegistryKey(_In_ MdDeviceObject DeviceObject, _In_ ULONG DevInstKeyType, _In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE DevInstRegKey)
virtual VOID SetDeviceTelemetryInfoFlags(_In_ FxDeviceInfoFlags Flag)
VOID SetDeviceBase(__in CfxDeviceBase *DeviceBase)
PVOID __inline GetObjectHandleUnchecked(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
VOID MarkNoDeleteDDI(__in FxObjectLockState State=ObjectLock)
VOID DeleteFromFailedCreate(VOID)
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS pGlobals, __in CfxDevice *Device, __deref_out FxPkgFdo **PkgFdo)
virtual _Must_inspect_result_ NTSTATUS Initialize(__in PWDFDEVICE_INIT DeviceInit)
_Must_inspect_result_ NTSTATUS CreateDefaultDeviceList(__in PWDF_CHILD_LIST_CONFIG ListConfig, __in PWDF_OBJECT_ATTRIBUTES ListAttributes)
_Must_inspect_result_ NTSTATUS RegisterCallbacks(__in PWDF_FDO_EVENT_CALLBACKS DispatchTable)
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(VOID)
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(__in PWDFDEVICE_INIT Init)
BOOLEAN m_AllowForwardRequestToParent
VOID RegisterCallbacks(__in PWDF_PDO_EVENT_CALLBACKS DispatchTable)
virtual _Must_inspect_result_ NTSTATUS Initialize(__in PWDFDEVICE_INIT DeviceInit)
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(VOID)
VOID AddChildList(__in FxChildList *List)
VOID RemoveDmaEnabler(__in FxDmaEnabler *Enabler)
VOID RemoveChildList(__in FxChildList *List)
_Must_inspect_result_ NTSTATUS AllocateDmaEnablerList(VOID)
VOID AddDmaEnabler(__in FxDmaEnabler *Enabler)
__inline VOID SetHandle(__in HANDLE Key)
__inline VOID SetObject(__in_opt MdDeviceObject DeviceObject)
VOID SetDeviceType(DEVICE_TYPE Value)
VOID SetCharacteristics(ULONG Characteristics)
DEVICE_TYPE GetDeviceType(VOID)
ULONG GetCharacteristics(VOID)
VOID SetStackSize(_In_ CCHAR Size)
__inline MdDeviceObject GetObject(VOID)
VOID SetDeviceExtension(PVOID Value)
VOID SetFlags(ULONG Flags)
static __inline VOID MxDereferenceObject(__in PVOID Object)
static __inline NTSTATUS MxCreateSymbolicLink(_In_ PUNICODE_STRING SymbolicLinkName, _In_ PUNICODE_STRING DeviceName)
static __inline VOID MxDeleteDevice(_In_ MdDeviceObject Device)
static __inline KIRQL MxGetCurrentIrql()
static __inline MdDeviceObject MxAttachDeviceToDeviceStack(_In_ MdDeviceObject SourceDevice, _In_ MdDeviceObject TargetDevice)
#define NT_SUCCESS(StatCode)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG _Out_ PDEVPROPTYPE PropertyType
FxVerifierDbgBreakPoint(pFxDriverGlobals)
PFX_DRIVER_GLOBALS pGlobals
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
@ DeviceInfoHasDynamicChildren
_Must_inspect_result_ NTSTATUS FxValidateObjectAttributes(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
__inline NTSTATUS FxVerifierCheckIrqlLevel(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)
GLuint GLsizei GLsizei * length
#define FX_DEVICEMAP_PATH
#define _Must_inspect_result_
#define _Analysis_assume_
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
#define REG_OPTION_VOLATILE
#define UNREFERENCED_PARAMETER(P)
#define STATUS_INTEGER_OVERFLOW
#define STATUS_BUFFER_TOO_SMALL
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
_Must_inspect_result_ NTSTATUS FxDuplicateUnicodeString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in const UNICODE_STRING *Source, __out PUNICODE_STRING Destination)
UNICODE_STRING m_UnicodeString
_In_ const DEVPROPKEY * PropertyKey
#define RtlZeroMemory(Destination, Length)
#define STATUS_NO_SUCH_DEVICE
#define STATUS_INVALID_DEVICE_STATE
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE Device
_In_ PWDFDEVICE_INIT DeviceInit
#define DECLARE_CONST_UNICODE_STRING(_variablename, _string)
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG DeviceInstanceKeyType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID PropertyBuffer
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
struct _WDF_DEVICE_PROPERTY_DATA * PWDF_DEVICE_PROPERTY_DATA
_Must_inspect_result_ _In_ WDFCMRESLIST List
#define PLUGPLAY_REGKEY_DEVICE
@ DevicePropertyPhysicalDeviceObjectName