IVMGuestOS::GetParameter method
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Retrieves a named parameter within the guest operating system.
Syntax
HRESULT GetParameter(
[in] BSTR inParameterName,
[out, retval] BSTR *outParameterValue
);
Parameters
-
inParameterName [in]
-
The parameter name. It must be between 1 and 255 characters in length and cannot contain a backslash (\) character.
-
outParameterValue [out, retval]
-
The parameter value.
Return value
This method can return one of these values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
A parameter is not valid or not specified. |
|
The parameter is NULL. |
|
The operation did not complete in a timely manner. |
|
The virtual machine is not running. |
|
The virtual machine is paused. |
|
Integration components are not installed in this virtual machine. |
|
An unexpected error has occurred. |
Remarks
The virtual machine must be running and integration components must be installed when this method is invoked. This method is only supported for Windows-based guest operating systems.
With integration components installed, the following key is automatically added to the guest operating system's registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters
When the guest operating system starts, the following registry string values are populated in the Parameters key:
- HostName
- PhysicalHostName
- PhysicalHostNameFullyQualified
- VirtualMachineName
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_IVMGuestOS is defined as 99fea0db-4880-499a-b6d8-73dff9bc91be |