ISpShortcut::GetShortcuts (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

ISpShortcut::GetShortcuts

ISpShortcut::GetShortcuts returns all of the user shortcuts for a given language.

HRESULT GetShortcuts(
   LANGID            LangID,
   SPSHORTCUTPAIRLIST    *pShortcutpairList 
);

Parameters

LangID
[in] The language the shortcuts are desired for (0 equals default).
pShortcutpairList
[in, out] A pointer to a list of shortcut pairs.

Return values

Value Description
S_OK Function completed successfully.

Remarks

The application must create a zero-initialized SPSHORTCUTPAIRLIST before calling GetShortcuts, using functions such as ZeroMemory or memset to do so. GetShortcuts creates a linked list of user shortcuts that start at the location pointed to by the pvBuffer member of SPSHORTCUTPAIRLIST. As long as the SPSHORTCUTPAIRLIST structure is still being used, the pvBuffer buffer should not be freed, because GetShortcuts reuses the buffer for reasons of efficiency, and reallocates storage when necessary.

When this structure is no longer needed, free the memory pointed to by pvBuffer by a call to CoTaskMemFree.