IVMDVDDrive::SetBusLocation method
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Attaches the DVD drive to the specified bus location in the virtual machine.
Syntax
HRESULT SetBusLocation(
[in] long busNumber,
[in] long deviceNumber
);
Parameters
-
busNumber [in]
-
The bus number to which this drive is to be attached. For example, on an IDE bus, this number would represent whether to use the primary or secondary bus number.
-
deviceNumber [in]
-
The device number to which this drive is to be attached. For example, on an IDE bus, this number would represent whether to use the primary or secondary device location.
Return value
This method can return one of these values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
The bus location specified is not valid. |
|
An unexpected error has occurred. |
|
The bus location cannot be set while the virtual machine is running or in a saved state. |
|
Another device is already attached to the specified bus location. |
|
The current drive could not be initialized. |
|
The changes could not be written to the preferences file because the virtual machine for this drive could not be determined. |
|
An unexpected error has occurred. |
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 |
|
IID |
IID_IVMDVDDrive is defined as b96328f6-6732-437d-a00d-ffa47e43971c |