FN_VMB_SERVER_CHANNEL_INIT_SET_VMBUS_HANDLE callback function

The VmbServerChannelInitSetVmbusHandle function associates an instance of VMBus with this channel.

Syntax

FN_VMB_SERVER_CHANNEL_INIT_SET_VMBUS_HANDLE FnVmbServerChannelInitSetVmbusHandle;

NTSTATUS FnVmbServerChannelInitSetVmbusHandle(
  VMBCHANNEL Channel,
  HANDLE VmbusHandle
)
{...}

Parameters

Channel

A handle for a channel.

VmbusHandle

A kernel mode handle to the VMBus vdev of the partition.

Return Value

Returns STATUS_SUCCESS if the operation is successful. Otherwise, returns an approprite NTSTATUS error code.

Remarks

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.

Requirements

   
Minimum supported client Windows 10, version 1809
Header vmbuskernelmodeclientlibapi.h

See Also

VmbConvertVmbusHandleToKernelHandle