Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

For Windows Mobile devices, the SHGetInputContextfunction retrieves the current state of a context feature of an input window.

Note:
The SHGetInputContextfunction is not implemented for Windows Embedded CE-based devices. It is provided as a stub in the operating system (OS) for application compatibility and will always return E_NOTIMPL.

Syntax

HRESULT SHGetInputContext (
  HWND 
hwnd,
  DWORD 
dwFeature,
  LPVOID 
lpValue,
  LPDWORD 
lpdwSize
);

Parameters

hwnd

[in] Handle to the window whose context feature is being retrieved.

dwFeature

[in] The context feature to retrieve, specified by a value from the SHIC_FEATUREenumeration. For more information, see Remarks.

lpValue

[out] Reference to a buffer that contains the requested feature value.

lpdwSize

[in, out] The size of the output buffer. If lpValueis input as NULL, the necessary size of the buffer is returned in lpdwSize.

Return Value

S_OK

The function completed successfully.

ERROR_INVALID_PARAMETER

The hwndor lpdwSizeparameter was NULL.

ERROR_NOT_SUPPORTED

The feature specified by the dwFeatureparameter was invalid.

ERROR_INSUFFICIENT_BUFFER

The buffer was too small to contain the requested feature value.

Remarks

The context features that can be retrieved are determined by the SHIC_FEATUREenumeration. One of the enumerators of SHIC_FEATUREmust be passed as the dwFeatureparameter of SHGetInputContext.

For any context feature that was not explicitly defined through SHSetInputContext, the value of that feature is taken from the window's SHIC CLASS. If the class does not define it, the value is taken from the window's parent window. Finally, if no windows in the parent chain have an explicitly set value, the value returned is the default for that feature.

Requirements

Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Pocket PC for Windows Mobile 2003 and later

See Also