ITfTextInputProcessor::Activate method (msctf.h)

Activates a text service when a user session starts.

Syntax

HRESULT Activate(
  [in] ITfThreadMgr *ptim,
  [in] TfClientId   tid
);

Parameters

[in] ptim

Pointer to the ITfThreadMgr interface for the thread manager that owns the text service.

[in] tid

Specifies the client identifier for the text service.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

TSF calls this method after creating an instance of a text service with a call to CoCreateInstance. This enables operations necessary to start the text service.

This method usually adds a reference to the thread manager for the session and advise sinks for events that involve the text service, such as change of focus, keystrokes, and window events. It also customizes the language bar for the text service.

The corresponding ITfTextInputProcessor::Deactivate method that shuts down the text service must release all references to the ptim parameter.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header msctf.h
DLL Sptip.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfTextInputProcessor

ITfTextInputProcessor::Deactivate

ITfThreadMgr