EVT_WDF_WMI_INSTANCE_SET_ITEM callback function (wdfwmi.h)
[Applies to KMDF only]
A driver's EvtWmiInstanceSetItem callback function sets a single item of a WMI data provider's instance data to a value that a WMI client supplies.
Syntax
EVT_WDF_WMI_INSTANCE_SET_ITEM EvtWdfWmiInstanceSetItem;
NTSTATUS EvtWdfWmiInstanceSetItem(
[in] WDFWMIINSTANCE WmiInstance,
[in] ULONG DataItemId,
[in] ULONG InBufferSize,
[in] PVOID InBuffer
)
{...}
Parameters
[in] WmiInstance
A handle to a WMI instance object.
[in] DataItemId
A value that identifies an item of data for a provider instance. This value corresponds to the WmiDataId value that is specified in the provider's MOF file.
[in] InBufferSize
The size, in bytes, of the input buffer that InBuffer points to.
[in] InBuffer
A pointer to the input buffer.
Return value
The EvtWmiInstanceSetItem callback function must return STATUS_SUCCESS if the operation succeeds. Otherwise, this function must return a status value for which NT_SUCCESS(status) equals FALSE. If the input buffer that the InBuffer parameter points to is too small to contain all of the data that the driver expects, the callback function must return STATUS_WMI_SET_FAILURE.
Remarks
To register an EvtWmiInstanceSetItem callback function, your driver must place the function's address in a WDF_WMI_INSTANCE_CONFIG structure before calling WdfWmiInstanceCreate.
The framework does not synchronize calls to a driver's WMI event callback functions with each other or with any of the driver's other event callback functions. If an EvtWmiInstanceSetItem callback function's data is dynamic and shared with other callback functions, your driver can use the framework's wait locks or spin locks to synchronize access to the data.
For more information about the EvtWmiInstanceSetItem callback function, see Supporting WMI in Framework-Based Drivers.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdfwmi.h (include Wdf.h) |
IRQL | PASSIVE_LEVEL |