次の方法で共有


GetInputScopes (Compact 2013)

3/28/2014

Queries the InputScope values bound to a specified input field.

Syntax

HRESULT GetInputScopes(
    HWND hwnd,
    InputScope **ppInputScopes,
    UINT *pcInputScopes,
);

Parameters

  • hwnd
    [in] The input field that the InputScope is set on.
  • ppInputScopes
    [out] Pointer to an array of input scopes. Returns the array that contains all InputScopes bounded on the hwnd.
  • pcInputScopes
    [out] A count of the number of InputScopes in ppInputScopes.

Return Value

Returns S_OK if it successfully retrieves the InputScope values.

Returns ERROR_INVALID_WINDOW_HANDLE if hwnd is NULL or E_INVALIDARG if hwnd is not a valid handle in the current process.

Returns E_OUTOFMEMORY if it cannot allocate enough memory for ppInputScopes to be returned

Remarks

To retrieve the list of phrases for an input field, use GetInputScopePhrases. To retrieve the grammar defined for speech recognition on an input field, use GetInputScopeSRGS.

Code Example

The following code shows how to get input scope values from a window.

InputScope* pInputScopes = NULL;
UINT cCount = 0;
GetInputScopes(hwnd, &pInputScopes, &cCount);

Requirements

Header

inputscope.h

See Also

Reference

Input Scope Functions
InputScope
Input Method Editor Reference