IVMUSBDevice::AttachedToVM property

[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]

Retrieves the name of the virtual machine to which the USB Device is attached.

This property is read-only.

Syntax

HRESULT get_AttachedToVM(
  [out, retval] BSTR *ConfigName
);

Property value

The name of the virtual machine (VM).

Error codes

Name/value Meaning
S_OK
0
The device is attached to the VM, and its name is returned.
S_FALSE
1
The device is attached to the host.
VM_E_USB_EXTERNAL_VM
0xA00400929
The device is attached to a VM in another user session.
E_POINTER
0x80004003
The parameter is NULL.

Requirements

Requirement Value
Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
None supported
End of client support
Windows 7
Product
Windows Virtual PC
Header
VPCCOMInterfaces.h
IID
IID_IVMUSBDevice is defined as 63C1258C-5721-4070-B86B-A6CE2AFEC0B3

See also

IVMUSBDevice