Share via


IMediaCenterInputModule::Activate Method

Determines whether the IME module becomes active. The shell calls this method when the user enters an input field and either the shell has determined that this is the appropriate IME module to use or the user has intentionally switched to this IME module.

Note   This method has been deprecated.

Syntax

  HRESULT Activate(
  IMediaCenterInputCallback*  pCallback,
  IMediaCenterInputField**  ppField
);

Parameters

pCallback

[in] Pointer to an IMediaCenterInputCallback interface that is used to cause the shell to update its UI presentation.

ppField

[out] Pointer to a pointer to an implementation of the IMediaCenterInputField interface.

Return Value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table:

Value Description
S_OK The IME module will activate.
E_NOTIMPL The IME module will not activate at this time.

Remarks

An IME module may or may not activate based on the current desktop LCID or other conditions during run time.

When returning S_OK, the ppField parameter must contain a pointer to an IMediaCenterInputField interface for the shell to use to interact with the IME module. The shell may have several input fields active at any one time. The input module must support this and must not consider the IMediaCenterInputField interface as a single-instance implementation. The shell ignores the ppField parameter if the Activate method returns E_NOTIMPL.

If the Activate method returns an error code (indicating that activation failed), the shell ignores the ppField parameter and tries to instantiate the default IME. If that also fails, the shell will not use an IME module.

Requirements

Header: ehinputmodule.idl

Platform: Windows XP Media Center Edition 2004 through Windows Vista

See Also