Επεξεργασία

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


IVMKeyboard::HasExclusiveAccess property

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

Indicates whether this object has exclusive control over the virtual machine's (VM) keyboard device.

This property is read/write.

Syntax

HRESULT put_HasExclusiveAccess(
  [in]          VARIANT_BOOL makeExclusive
);

HRESULT get_HasExclusiveAccess(
  [out, retval] VARIANT_BOOL *isExclusive
);

Property value

TRUE if exclusive access to the VM's keyboard device has been acquired, FALSE otherwise.

Error codes

Name/value Meaning
S_OK
0
The operation was successful.
E_POINTER
0x80004003
The isExclusive parameter is NULL.
S_FALSE
1
The requested exclusive mode is already set for this device. This can happen when trying to set exclusive mode when it has already been acquired, or when trying to release exclusive mode when it had not been previously acquired.
VM_E_SET_EXCLUSIVE_MODE_FAIL
0xA0040825
Failed to set or release exclusive mode as requested. This could be because the VM is no longer running, or because another process has already acquired exclusive mode on the VM's keyboard device.
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