Bewerken

Delen via


EVT_VMB_CHANNEL_RESTORE_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 EvtVmbChannelRestorePacket callback function is invoked when the virtualization service provider (VSP) server endpoint must restore the state associated with a packet object.

Syntax

EVT_VMB_CHANNEL_RESTORE_PACKET EvtVmbChannelRestorePacket;

NTSTATUS EvtVmbChannelRestorePacket(
  [in] VMBCHANNEL Channel,
  [in] PVOID LibBuf,
  [in] UINT32 LibBufSize,
  [in] PVOID SaveBuf,
  [in] UINT32 SaveBufSize
)
{...}

Parameters

[in] Channel

The channel on which the packet arrives.

[in] LibBuf

Pointer to packet object state internal to the Kernel Mode Client Library (KMCL).

[in] LibBufSize

Size of the LibBuf parameter, in bytes.

[in] SaveBuf

Pointer to transaction state specific to the VSP.

[in] SaveBufSize

Size of the SaveBuf parameter, in bytes.

Return value

EvtVmbChannelRestorePacket returns a status code.

Remarks

The VmbServerChannelInitSetSaveRestorePacketCallbacks function sets a callback function for restoring packets for each channel.

In order to restore an in-flight packet object, the VSP must allocate a new packet by using the VmbPacketAllocate function. The VSP restores the packet to the previous state by passing LibBuf and LibBufSize to the VmbPacketRestore function. If the VSP provided any internal state for the transaction in the EvtVmbChannelSavePacket callback function, then this is provided in SaveBuf, and restored by the VSP.

Requirements

Requirement Value
Target Platform Windows
Header vmbuskernelmodeclientlibapi.h (include VmbusKernelModeClientLibApi.h)
IRQL PASSIVE_LEVEL

See also

EvtVmbChannelSavePacket

VmbPacketAllocate

VmbPacketRestore

VmbServerChannelInitSetSaveRestorePacketCallbacks