IVMKeyboard::PressKey method
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Simulates a key being pressed down.
Syntax
HRESULT PressKey(
[in] BSTR key
);
Parameters
-
key [in]
-
The key code for the key to be pressed.
Return value
This method can return one of these values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
The parameter is NULL. |
|
The specified string is empty, or contains an invalid key code. |
|
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_IVMKeyboard is defined as 00695f2e-c5ad-4d6e-b1ab-336ed121f8c4 |