mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
806 lines
17 KiB
C
806 lines
17 KiB
C
/*++
|
|
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
_WdfVersionBuild_
|
|
|
|
Module Name:
|
|
|
|
WdfPdo.h
|
|
|
|
Abstract:
|
|
|
|
This is the interface to the PDO WDFDEVICE handle.
|
|
|
|
Environment:
|
|
|
|
kernel mode only
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
|
|
//
|
|
// NOTE: This header is generated by stubwork. Please make any
|
|
// modifications to the corresponding template files
|
|
// (.x or .y) and use stubwork to regenerate the header
|
|
//
|
|
|
|
#ifndef _WDFPDO_H_
|
|
#define _WDFPDO_H_
|
|
|
|
#ifndef WDF_EXTERN_C
|
|
#ifdef __cplusplus
|
|
#define WDF_EXTERN_C extern "C"
|
|
#define WDF_EXTERN_C_START extern "C" {
|
|
#define WDF_EXTERN_C_END }
|
|
#else
|
|
#define WDF_EXTERN_C
|
|
#define WDF_EXTERN_C_START
|
|
#define WDF_EXTERN_C_END
|
|
#endif
|
|
#endif
|
|
|
|
WDF_EXTERN_C_START
|
|
|
|
|
|
|
|
#if (NTDDI_VERSION >= NTDDI_WIN2K)
|
|
|
|
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_RESOURCES_QUERY)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
NTSTATUS
|
|
STDCALL
|
|
EVT_WDF_DEVICE_RESOURCES_QUERY(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
WDFCMRESLIST Resources
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_RESOURCES_QUERY *PFN_WDF_DEVICE_RESOURCES_QUERY;
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
NTSTATUS
|
|
STDCALL
|
|
EVT_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
WDFIORESREQLIST IoResourceRequirementsList
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY *PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY;
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_EJECT)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
NTSTATUS
|
|
STDCALL
|
|
EVT_WDF_DEVICE_EJECT(
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_EJECT *PFN_WDF_DEVICE_EJECT;
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_SET_LOCK)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
NTSTATUS
|
|
STDCALL
|
|
EVT_WDF_DEVICE_SET_LOCK(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
BOOLEAN IsLocked
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_SET_LOCK *PFN_WDF_DEVICE_SET_LOCK;
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_ENABLE_WAKE_AT_BUS)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
NTSTATUS
|
|
STDCALL
|
|
EVT_WDF_DEVICE_ENABLE_WAKE_AT_BUS(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
SYSTEM_POWER_STATE PowerState
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_ENABLE_WAKE_AT_BUS *PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS;
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_DISABLE_WAKE_AT_BUS)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
VOID
|
|
STDCALL
|
|
EVT_WDF_DEVICE_DISABLE_WAKE_AT_BUS(
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_DISABLE_WAKE_AT_BUS *PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS;
|
|
|
|
typedef
|
|
_Function_class_(EVT_WDF_DEVICE_REPORTED_MISSING)
|
|
_IRQL_requires_same_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
VOID
|
|
STDCALL
|
|
EVT_WDF_DEVICE_REPORTED_MISSING(
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
typedef EVT_WDF_DEVICE_REPORTED_MISSING *PFN_WDF_DEVICE_REPORTED_MISSING;
|
|
|
|
typedef struct _WDF_PDO_EVENT_CALLBACKS {
|
|
//
|
|
// The size of this structure in bytes
|
|
//
|
|
ULONG Size;
|
|
|
|
//
|
|
// Called in response to IRP_MN_QUERY_RESOURCES
|
|
//
|
|
PFN_WDF_DEVICE_RESOURCES_QUERY EvtDeviceResourcesQuery;
|
|
|
|
//
|
|
// Called in response to IRP_MN_QUERY_RESOURCE_REQUIREMENTS
|
|
//
|
|
PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY EvtDeviceResourceRequirementsQuery;
|
|
|
|
//
|
|
// Called in response to IRP_MN_EJECT
|
|
//
|
|
PFN_WDF_DEVICE_EJECT EvtDeviceEject;
|
|
|
|
//
|
|
// Called in response to IRP_MN_SET_LOCK
|
|
//
|
|
PFN_WDF_DEVICE_SET_LOCK EvtDeviceSetLock;
|
|
|
|
//
|
|
// Called in response to the power policy owner sending a wait wake to the
|
|
// PDO. Bus generic arming shoulding occur here.
|
|
//
|
|
PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS EvtDeviceEnableWakeAtBus;
|
|
|
|
//
|
|
// Called in response to the power policy owner sending a wait wake to the
|
|
// PDO. Bus generic disarming shoulding occur here.
|
|
//
|
|
PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS EvtDeviceDisableWakeAtBus;
|
|
|
|
//
|
|
// Called when reporting the PDO missing to PnP manager in response to
|
|
// IRP_MN_QUERY_DEVICE_RELATIONS for Bus Relations.
|
|
//
|
|
PFN_WDF_DEVICE_REPORTED_MISSING EvtDeviceReportedMissing;
|
|
|
|
} WDF_PDO_EVENT_CALLBACKS, *PWDF_PDO_EVENT_CALLBACKS;
|
|
|
|
FORCEINLINE
|
|
VOID
|
|
WDF_PDO_EVENT_CALLBACKS_INIT(
|
|
_Out_ PWDF_PDO_EVENT_CALLBACKS Callbacks
|
|
)
|
|
{
|
|
RtlZeroMemory(Callbacks, sizeof(WDF_PDO_EVENT_CALLBACKS));
|
|
Callbacks->Size = sizeof(WDF_PDO_EVENT_CALLBACKS);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAllocate
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
PWDFDEVICE_INIT
|
|
(STDCALL *PFN_WDFPDOINITALLOCATE)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE ParentDevice
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
PWDFDEVICE_INIT
|
|
WdfPdoInitAllocate(
|
|
_In_
|
|
WDFDEVICE ParentDevice
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITALLOCATE) WdfFunctions[WdfPdoInitAllocateTableIndex])(WdfDriverGlobals, ParentDevice);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitSetEventCallbacks
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
VOID
|
|
(STDCALL *PFN_WDFPDOINITSETEVENTCALLBACKS)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PWDF_PDO_EVENT_CALLBACKS DispatchTable
|
|
);
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
VOID
|
|
WdfPdoInitSetEventCallbacks(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PWDF_PDO_EVENT_CALLBACKS DispatchTable
|
|
)
|
|
{
|
|
((PFN_WDFPDOINITSETEVENTCALLBACKS) WdfFunctions[WdfPdoInitSetEventCallbacksTableIndex])(WdfDriverGlobals, DeviceInit, DispatchTable);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAssignDeviceID
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITASSIGNDEVICEID)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING DeviceID
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAssignDeviceID(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING DeviceID
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITASSIGNDEVICEID) WdfFunctions[WdfPdoInitAssignDeviceIDTableIndex])(WdfDriverGlobals, DeviceInit, DeviceID);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAssignInstanceID
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITASSIGNINSTANCEID)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING InstanceID
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAssignInstanceID(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING InstanceID
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITASSIGNINSTANCEID) WdfFunctions[WdfPdoInitAssignInstanceIDTableIndex])(WdfDriverGlobals, DeviceInit, InstanceID);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAddHardwareID
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITADDHARDWAREID)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING HardwareID
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAddHardwareID(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING HardwareID
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITADDHARDWAREID) WdfFunctions[WdfPdoInitAddHardwareIDTableIndex])(WdfDriverGlobals, DeviceInit, HardwareID);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAddCompatibleID
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITADDCOMPATIBLEID)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING CompatibleID
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAddCompatibleID(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING CompatibleID
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITADDCOMPATIBLEID) WdfFunctions[WdfPdoInitAddCompatibleIDTableIndex])(WdfDriverGlobals, DeviceInit, CompatibleID);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAssignContainerID
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITASSIGNCONTAINERID)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING ContainerID
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAssignContainerID(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING ContainerID
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITASSIGNCONTAINERID) WdfFunctions[WdfPdoInitAssignContainerIDTableIndex])(WdfDriverGlobals, DeviceInit, ContainerID);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAddDeviceText
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITADDDEVICETEXT)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING DeviceDescription,
|
|
_In_
|
|
PCUNICODE_STRING DeviceLocation,
|
|
_In_
|
|
LCID LocaleId
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAddDeviceText(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
PCUNICODE_STRING DeviceDescription,
|
|
_In_
|
|
PCUNICODE_STRING DeviceLocation,
|
|
_In_
|
|
LCID LocaleId
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITADDDEVICETEXT) WdfFunctions[WdfPdoInitAddDeviceTextTableIndex])(WdfDriverGlobals, DeviceInit, DeviceDescription, DeviceLocation, LocaleId);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitSetDefaultLocale
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
VOID
|
|
(STDCALL *PFN_WDFPDOINITSETDEFAULTLOCALE)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
LCID LocaleId
|
|
);
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
VOID
|
|
WdfPdoInitSetDefaultLocale(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
LCID LocaleId
|
|
)
|
|
{
|
|
((PFN_WDFPDOINITSETDEFAULTLOCALE) WdfFunctions[WdfPdoInitSetDefaultLocaleTableIndex])(WdfDriverGlobals, DeviceInit, LocaleId);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAssignRawDevice
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOINITASSIGNRAWDEVICE)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
CONST GUID* DeviceClassGuid
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoInitAssignRawDevice(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit,
|
|
_In_
|
|
CONST GUID* DeviceClassGuid
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOINITASSIGNRAWDEVICE) WdfFunctions[WdfPdoInitAssignRawDeviceTableIndex])(WdfDriverGlobals, DeviceInit, DeviceClassGuid);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoInitAllowForwardingRequestToParent
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
WDFAPI
|
|
VOID
|
|
(STDCALL *PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit
|
|
);
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
FORCEINLINE
|
|
VOID
|
|
WdfPdoInitAllowForwardingRequestToParent(
|
|
_In_
|
|
PWDFDEVICE_INIT DeviceInit
|
|
)
|
|
{
|
|
((PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT) WdfFunctions[WdfPdoInitAllowForwardingRequestToParentTableIndex])(WdfDriverGlobals, DeviceInit);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoMarkMissing
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOMARKMISSING)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoMarkMissing(
|
|
_In_
|
|
WDFDEVICE Device
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOMARKMISSING) WdfFunctions[WdfPdoMarkMissingTableIndex])(WdfDriverGlobals, Device);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoRequestEject
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
VOID
|
|
(STDCALL *PFN_WDFPDOREQUESTEJECT)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
VOID
|
|
WdfPdoRequestEject(
|
|
_In_
|
|
WDFDEVICE Device
|
|
)
|
|
{
|
|
((PFN_WDFPDOREQUESTEJECT) WdfFunctions[WdfPdoRequestEjectTableIndex])(WdfDriverGlobals, Device);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoGetParent
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
WDFDEVICE
|
|
(STDCALL *PFN_WDFPDOGETPARENT)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
WDFDEVICE
|
|
WdfPdoGetParent(
|
|
_In_
|
|
WDFDEVICE Device
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOGETPARENT) WdfFunctions[WdfPdoGetParentTableIndex])(WdfDriverGlobals, Device);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoRetrieveIdentificationDescription
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_Inout_
|
|
PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoRetrieveIdentificationDescription(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_Inout_
|
|
PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
|
|
)
|
|
{
|
|
return ((PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION) WdfFunctions[WdfPdoRetrieveIdentificationDescriptionTableIndex])(WdfDriverGlobals, Device, IdentificationDescription);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoRetrieveAddressDescription
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDORETRIEVEADDRESSDESCRIPTION)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_Inout_
|
|
PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoRetrieveAddressDescription(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_Inout_
|
|
PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
|
|
)
|
|
{
|
|
return ((PFN_WDFPDORETRIEVEADDRESSDESCRIPTION) WdfFunctions[WdfPdoRetrieveAddressDescriptionTableIndex])(WdfDriverGlobals, Device, AddressDescription);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoUpdateAddressDescription
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOUPDATEADDRESSDESCRIPTION)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_Inout_
|
|
PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoUpdateAddressDescription(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_Inout_
|
|
PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOUPDATEADDRESSDESCRIPTION) WdfFunctions[WdfPdoUpdateAddressDescriptionTableIndex])(WdfDriverGlobals, Device, AddressDescription);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoAddEjectionRelationsPhysicalDevice
|
|
//
|
|
typedef
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
NTSTATUS
|
|
(STDCALL *PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
PDEVICE_OBJECT PhysicalDevice
|
|
);
|
|
|
|
_Must_inspect_result_
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
NTSTATUS
|
|
WdfPdoAddEjectionRelationsPhysicalDevice(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
PDEVICE_OBJECT PhysicalDevice
|
|
)
|
|
{
|
|
return ((PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE) WdfFunctions[WdfPdoAddEjectionRelationsPhysicalDeviceTableIndex])(WdfDriverGlobals, Device, PhysicalDevice);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoRemoveEjectionRelationsPhysicalDevice
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
VOID
|
|
(STDCALL *PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
PDEVICE_OBJECT PhysicalDevice
|
|
);
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
VOID
|
|
WdfPdoRemoveEjectionRelationsPhysicalDevice(
|
|
_In_
|
|
WDFDEVICE Device,
|
|
_In_
|
|
PDEVICE_OBJECT PhysicalDevice
|
|
)
|
|
{
|
|
((PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE) WdfFunctions[WdfPdoRemoveEjectionRelationsPhysicalDeviceTableIndex])(WdfDriverGlobals, Device, PhysicalDevice);
|
|
}
|
|
|
|
//
|
|
// WDF Function: WdfPdoClearEjectionRelationsDevices
|
|
//
|
|
typedef
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
WDFAPI
|
|
VOID
|
|
(STDCALL *PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES)(
|
|
_In_
|
|
PWDF_DRIVER_GLOBALS DriverGlobals,
|
|
_In_
|
|
WDFDEVICE Device
|
|
);
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
FORCEINLINE
|
|
VOID
|
|
WdfPdoClearEjectionRelationsDevices(
|
|
_In_
|
|
WDFDEVICE Device
|
|
)
|
|
{
|
|
((PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES) WdfFunctions[WdfPdoClearEjectionRelationsDevicesTableIndex])(WdfDriverGlobals, Device);
|
|
}
|
|
|
|
|
|
|
|
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
|
|
|
|
|
|
|
|
WDF_EXTERN_C_END
|
|
|
|
#endif // _WDFPDO_H_
|
|
|