Collapse All
Virtuozzo Virtualization SDK C API Reference
ContentsIndex
PreviousUpNext
PrlVmCfg_GetDevByType Function
PHT_VM_CONFIGURATION  See Also

Obtains a handle to a virtual device in a virtual machine according to the specified device type and index.

Syntax
PRL_RESULT PrlVmCfg_GetDevByType(
    PRL_HANDLE hVmCfg, 
    PRL_DEVICE_TYPE vmDeviceType, 
    PRL_UINT32 nIndex, 
    PRL_HANDLE_PTR phDevice
);
File

PrlApiVm.h

Parameters

hVmCfg
A handle of type PHT_VM_CONFIGURATION identifying the virtual machine configuration.
vmDeviceType
The device type.
nIndex
An index identifying the device instance (beginning with 0). To determine the number of the devices of the specified type available in the virtual machine, use the PrlVmCfg_GetDevsCountByType function.
phDevice
[out] A pointer to a variable that receives the handle. The type of the handle can be determined using the PrlHandle_GetType function. You should also "know" the handle type based on the device type for which you are obtaining a handle. Search this documentation for topics with PHT_VIRTUAL_DEV_ prefix in their names for the list of the available virtual device handles.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed, or device index out of bound 

PRL_ERR_SUCCESS - function completed successfully. 

See Also
Links
Copyright ©2016-2017 Parallels International GmbH. All rights reserved.