// vmbuskernelmodeclientlibapi.h
FN_VMB_PACKET_INITIALIZE FnVmbPacketInitialize;
NTSTATUS FnVmbPacketInitialize(
VMBCHANNEL Channel,
VMBPACKET VmbPacket,
UINT32 ByteCount
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
[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 VmbPacketInitialize function initializes a buffer to contain a VMBus packet.
ChannelA handle for a channel.
VmbPacketThe buffer to use to store the VMBus packet.
ByteCountThe size of Buffer, in bytes.
VmbPacketInitialize returns the following status codes:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The function finished successfully. |
| STATUS_INVALID_PARAMETER_3 | The value of ByteCount is not valid. It needs to be greater than the maximum packet size plus the size of a void pointer. |
//Declaration
FN_VMB_PACKET_INITIALIZE FnVmbPacketInitialize;
// Definition
NTSTATUS FnVmbPacketInitialize
(
VMBCHANNEL Channel
VMBPACKET VmbPacket
UINT32 ByteCount
)
{...}
The size of the buffer must be at least the size calculated by using the VmbChannelSizeofPacket function.
VmbPacketInitialize is an alternative to the VmbPacketAllocate function. Use the current function if the caller supplies the memory for the packet object.
The packet's initial completion routine is invalid and must be set before sending the packet.
[!IMPORTANT] This function is called through the VMBus Kernel Mode Client Library (KMCL) interface, provided by the Vmbkmcl.sys bus driver. This is a client function accessed from the KMCL_CLIENT_INTERFACE_V1 structure.
For more information, see the Remarks section of the KMCL_CLIENT_INTERFACE_V1.