IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK callback function (wdm.h)
Allows the caller to register a callback to be invoked whenever any state change related to a DMA_IOMMU_INTERFACE_EX occurs.
Syntax
IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK IommuRegisterInterfaceStateChangeCallback;
NTSTATUS IommuRegisterInterfaceStateChangeCallback(
PIOMMU_INTERFACE_STATE_CHANGE_CALLBACK StateChangeCallback,
PVOID Context,
PIOMMU_DMA_DEVICE DmaDevice,
PIOMMU_INTERFACE_STATE_CHANGE_FIELDS StateFields
)
{...}
Parameters
StateChangeCallback
[In] The IOMMU_INTERFACE_STATE_CHANGE_CALLBACK to be registered.
Context
[In, optional] An optional context that will be passed to the state change callback.
DmaDevice
[In] A pointer to an opaque token representing the IOMMU_DMA_DEVICE that will be linked to the callback.
StateFields
[In] A pointer to the states that a caller is registering to be notified about. See IOMMU_INTERFACE_STATE_CHANGE_FIELDS.
Return value
STATUS_SUCCESS if the operation is successful.
Possible error return values include the following status codes.
Return code | Description |
---|---|
STATUS_UNSUCCESSFUL | The routine failed to register the provided callback because the IOMMU_DMA_DEVICE has already been registered with a callback. |
STATUS_INVALID_PARAMETER_4 | The caller did not indicate interest in any interface state field in StateFields . |
For more information, see NTSTATUS Values.
Remarks
Registration will always immediately invoke the callback to avoid race conditions with any notifications that invoke the callbacks. Callback owners should not assume the state when a callback is invoked and should always check that the state matches their needs.
Before disposing of a DMA_IOMMU_INTERFACE_EX or IOMMU_DMA_DEVICE, the owner is responsible for unregistering all its registered callbacks.
Only one callback can be registered per IOMMU_DMA_DEVICE.
Requirements
Requirement | Value |
---|---|
Minimum supported server | Windows Server 2022 |
Header | wdm.h (include Wdm.h) |
See also
IOMMU_INTERFACE_STATE_CHANGE_CALLBACK
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for