Collapse All
Parallels C API Reference Guide
ContentsIndex
PreviousUpNext
PHT_HW_GENERIC_DEVICE
Functions  Functions by Handle  Legend  Send Feedback

PHT_HW_GENERIC_DEVICE is a base handle used to manage physical devices. A physical device can be a real physical device installed on the host computer or, in some cases, a device in a virtual machine as seen by the guest operating system (this handle should not be confused with handles that are used to manage virtual devices).

Description

To obtain a handle identifying a specific device of a particular type, an appropriate function from the PHT_SERVER_CONFIG group must be used. For example, to obtain a handle identifying a floppy disk drive, the PrlSrvCfg_GetFloppyDisk function must be used; to obtain an optical disk drive handle, use the PrlSrvCfg_GetOpticalDisk (other functions are named similarly). Some of these functions obtain a handle of type PHT_HW_GENERIC_DEVICE described here. Others obtain a different handle specific to the device type. These other handles are derived from the PHT_HW_GENERIC_DEVICE handle and contain additional functions. For example, the PHT_HW_HARD_DISK handle is derived from PHT_HW_GENERIC_DEVICE and contains additional functions, such as functions for getting the disk partition information. All of the functions provided by the PHT_HW_GENERIC_DEVICE handle can also be used with derived handles, which means that a derived handle can be passed as a parameter to any of the functions described in this section. 

The following is the list of handles that are derived from PHT_HW_GENERIC_DEVICE: 

PHT_HW_HARD_DISK 

PHT_HW_HARD_DISK_PARTITION 

PHT_HW_NET_ADAPTER 

PHT_HW_GENERIC_PCI_DEVICE 

Functions
 
Name 
Description 
 
Returns the device state enumerated in PRL_GENERIC_DEVICE_STATE
 
Returns the system device ID. 
 
Returns the system device name. 
 
Returns the device type. 
 
Determines whether the device is connected to the virtual machine. 
 
Sets the device state enumerated in PRL_GENERIC_DEVICE_STATE
Links
Copyright (c) 1999-2009 Parallels Software International Inc.
What do you think about this topic? Send feedback!