Επεξεργασία

Κοινή χρήση μέσω


IVMKeyboard::PressAndReleaseKey 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 and then released.

Syntax

HRESULT PressAndReleaseKey(
  [in] BSTR key
);

Parameters

key [in]

The key code for the key to be pressed and released.

Return value

This method can return one of these values.

Return code/value Description
S_OK
0
The operation was successful.
E_POINTER
0x80004003
The parameter is NULL.
E_INVALIDARG
0x80000003
The specified string is empty, or contains an invalid key code.
DISP_E_EXCEPTION
0x80020009
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
VPCCOMInterfaces.h
IID
IID_IVMKeyboard is defined as 00695f2e-c5ad-4d6e-b1ab-336ed121f8c4

See also

IVMKeyboard