Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The client-defined callback invoked by the WinI3C library when an In-Band-Interrupt (IBI) is received from a WinI3C-Target. The callback is registered with WinI3CEnableIbis or WinI3CEnableIbisWithAutoCommandRead.
Syntax
typedef void (CALLBACK* WINI3CIBIRECEIVEDCALLBACK)(
_In_opt_ void* ibiReceivedCallbackContext,
_In_ WinI3CTarget target,
_When_(ibiPayload == NULL, _In_range_(0, 0)) UINT32 ibiPayloadSize,
_In_reads_bytes_opt_(ibiPayloadSize) const void* ibiPayload);
Parameters
[in, optional] ibiReceivedCallbackContext
The optional client-supplied context when IBIs were enabled.
NULL if no context was supplied by the client.
The client may destroy this context at any time.
[in] target
The WinI3CTarget that the IBI was received from.
This is the WinI3CTarget that was previously registered for IBIs with WinI3CEnableIbis or WinI3CEnableIbisWithAutoCommandRead.
[in] ibiPayloadSize
The size, in bytes, of the IBI payload received from the WinI3C-Target, including that which was received by the subsequent Auto-Command-Read (if WinI3CEnableIbisWithAutoCommandRead was used to enable IBIs)
This is 0 when ibiPayload is NULL.
[in] ibiPayload
A library-allocated buffer containing the IBI payload.
The buffer is always ibiPayloadSize bytes and is NULL when ibiPayloadSize is 0.
The buffer is destroyed when the callback returns; the client shall make its own copy if the payload is needed later.
If WinI3CEnableIbisWithAutoCommandRead was used to enable IBIs, the buffer contains payload from both the IBI and the subsequent Auto-Command-Read.
Return value
This callback does not return a value.
Remarks
There is no guarantee as to which thread the callback is invoked on, and it may be invoked before WinI3CEnableIbis returns.
There are NO serialization guarantees; the callback may be invoked by multiple threads simultaneously (in response to receiving multiple IBIs).
There are NO ordering guarantees; the callback may be invoked for an IBI that was received earlier/later than another IBI.
The client shall not throw exceptions from this callback; all exceptions are caught and ignored by the library.
Blocking this callback from returning may block other callback invocations.
The same callback may be registered for multiple WinI3CTarget, use the passed target parameter to disambiguate.
Example
#include <wini3c.h>
void main()
{
...
if (FAILED(WinI3CEnableIbis(target, nullptr, EvtIbiCallback)))
{
// Handle failure.
}
...
}
void CALLBACK EvtIbiCallback(
_In_opt_ void* ibiReceivedCallbackContext,
_In_ WinI3CTarget target,
_When_(ibiPayload == NULL, _In_range_(0, 0)) UINT32 ibiPayloadSize,
_In_reads_bytes_opt_(ibiPayloadSize) const void* ibiPayload)
{
...
}
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 11 25H2 October update (build 26200) |
| Target Platform | Windows |
| Header | wini3c.h |