Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
TSF Reference
TSF Interfaces
 ITfInputProcessorProfileMgr::Activa...
Text Services Framework
ITfInputProcessorProfileMgr::ActivateProfile

The ITfInputProcessorProfileMgr::ActivateProfile method activates the specified text service�s profile or keyboard layout.

HRESULT ActivateProfile(
  DWORD dwProfileType,
  LANGID langid,
  REFCLSID clsid,
  REFGUID guidProfile,
  HKL hkl,
  DWORD dwFlags,
);

Parameters

dwProfileType

[in] The type of this profile. This is one of these values.

Value Meaning
TF_PROFILETYPE_INPUTPROCESSOR This is a text service.
TF_PROFILETYPE_KEYBOARDLAYOUT This is a keyboard layout.
langid

[in] The language id of the profile to be activated.

clsid

[in] The CLSID of the text service of the profile to be activated. This must be CLSID_NULL if dwProfileType is TF_PROFILETYPE_KEYBOARDLAYOUT.

guidProfile

[in] The guidProfile of the profile to be activated. This must be GUID_NULL if dwProfileType is TF_PROFILETYPE_KEYBOARDLAYOUT.

hkl

[in] The handle of the keyboard layout. This must be NULL if dwProfileType is TF_PROFILETYPE_INPUTPROCESSOR.

dwFlags
[in]

The combination of the following bits:

Value Meaning
TF_IPPMF_FORPROCESS Activate this profile for all threads in the process.
TF_IPPMF_FORSESSION Activate this profile for all threads in the current desktop.
TF_IPPMF_ENABLEPROFILE Update the registry to enable this profile for this user.
TF_IPPMF_DISABLEPROFILE
TF_IPPMF_DONTCARECURRENTINPUTLANGUAGE If the current input language does not match with the requested profile�s language, TSF marks this profile to be activated when the requested input language is switched. If this flag is off and the current input language is not matched, this method fails.

Return Values

Value Meaning
S_OK The method was successful.
S_FALSE The language profile is not enabled.
E_FAIL An unspecified error occurred.
E_INVALIDARG One or more parameters are invalid.

Requirements

Windows NT/2000/XP: Included in Windows XP.
Redistributable: Requires TSF 1.0 on Windows NT 4.0; Windows 2000; and Windows 98/Me.
Header: Declared in Msctf.idl and Msctf.h.
Library: Included as a resource in Msctf.dll.

See Also

ITfInputProcessorProfileMgr::DeactivateProfile

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker