ImportKeysEx

Imports key definitions from an XML file or string for the selected embedded or attached keyboard.

Syntax

HRESULT ImportKeysEx(
    BYTE keyboard,
TCHAR* str,
bool additive
);

Parameters

keyboard
Indicates the keyboard to be used for this operation:

str
Name of existing XML key definition file, or string containing an XML segment.

additive
Boolean. Set to true if new keys are to be added to existing keys, or set to false if new keys replace all existing keys. If the Absolute attribute is set in the .xml file, this parameter is ignored.

Return Values

S_OK
The function succeeded.

Other
The function failed. Use the Microsoft errlook.exe utility to determine the meaning of this value.

Remarks

If str points to an existing file, that file is imported. If str does not point to a file, an attempt is made to parse the string as an XML segment.

The XML file or string to be imported must not be longer than 65530 bytes long. Memory considerations on the computer may force more strict limitations.

If more than one external keyboard is attached to the computer, call GetKeyboardIDEx to return the unique identifier for each attached keyboard.

More Information

KBDTools Functions