// vmbuskernelmodeclientlibapi.h
FN_VMB_SERVER_CHANNEL_INIT_SET_VMBUS_HANDLE FnVmbServerChannelInitSetVmbusHandle;
NTSTATUS FnVmbServerChannelInitSetVmbusHandle(
VMBCHANNEL Channel,
HANDLE VmbusHandle
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The VmbServerChannelInitSetVmbusHandle function associates an instance of VMBus with this channel.
ChannelA handle for a channel.
VmbusHandleA kernel mode handle to the VMBus vdev of the partition.
Returns STATUS_SUCCESS if the operation is successful. Otherwise, returns an appropriate NTSTATUS error code.
//Declaration
FN_VMB_SERVER_CHANNEL_INIT_SET_VMBUS_HANDLE FnVmbServerChannelInitSetVmbusHandle;
// Definition
NTSTATUS FnVmbServerChannelInitSetVmbusHandle
(
VMBCHANNEL Channel
HANDLE VmbusHandle
)
{...}
The VMBus instance was previously initialized for the specific guest virtual machine. Therefore, invoking this function identifies the child virtual machine to which this channel is offered.
Obtain a value for the VmbusHandle parameter by using the VmbConvertVmbusHandleToKernelHandle function.
This function can be called while running in any thread context.
[!IMPORTANT] This function is called through the VMBus Kernel Mode Client Library (KMCL) interface, provided by the Vmbkmcl.sys bus driver. This is a server-only function accessed from the KMCL_SERVER_ONLY_METHODS structure.
For more information, see the Remarks section of KMCL_SERVER_ONLY_METHODS.
VmbConvertVmbusHandleToKernelHandle