EVT_VMB_CHANNEL_SAVE_PACKET callback function (vmbuskernelmodeclientlibapi.h)
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
The EvtVmbChannelSavePacket callback function is invoked when the virtualization service provider (VSP) endpoint must save the state associated with a packet.
Syntax
EVT_VMB_CHANNEL_SAVE_PACKET EvtVmbChannelSavePacket;
NTSTATUS EvtVmbChannelSavePacket(
[in] VMBCHANNEL Channel,
[in] VMBPACKET Packet,
[out] PVOID SaveBuf,
[in] UINT32 SaveBufSize,
[out] PUINT32 BytesNeeded
)
{...}
Parameters
[in] Channel
The channel on which the packet arrives.
[in] Packet
The packet for which VSP saves state.
[out] SaveBuf
The buffer into which to save the state.
[in] SaveBufSize
Size of the SaveBuf parameter, in bytes.
[out] BytesNeeded
Size necessary to save the state of the transaction, in bytes.
Return value
EvtVmbChannelSavePacket returns a status code.
Remarks
The VmbServerChannelInitSetSaveRestorePacketCallbacks function sets a callback function for saving packets for each channel.
The VSP saves the state associated with the transaction that is unique to the VSP. The Kernel Mode Client Library (KMCL) saves its own state.
This function is invoked for each packet object that is currently in use. The first invocation passes a zero (0) value for the SaveBufSize parameter. This call fails if there is any state that needs to be saved, which fills the BytesNeeded with the actual size requirement. If this first invocation returns a failure code, the KMCL calls a second time with a buffer of at least the length stipulated in the first call.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | vmbuskernelmodeclientlibapi.h (include VmbusKernelModeClientLibApi.h) |
IRQL | PASSIVE_LEVEL |