ITfInputProcessorProfileMgr::RegisterProfile method (msctf.h)

The ITfInputProcessorProfileMgr::RegisterProfile method registers the text service and the profile.

Syntax

HRESULT RegisterProfile(
  [in] REFCLSID    rclsid,
  [in] LANGID      langid,
  [in] REFGUID     guidProfile,
       const WCHAR *pchDesc,
  [in] ULONG       cchDesc,
       const WCHAR *pchIconFile,
  [in] ULONG       cchFile,
  [in] ULONG       uIconIndex,
  [in] HKL         hklsubstitute,
  [in] DWORD       dwPreferredLayout,
  [in] BOOL        bEnabledByDefault,
  [in] DWORD       dwFlags
);

Parameters

[in] rclsid

[in] CLSID of the text service.

[in] langid

[in] The language id of the profile.

[in] guidProfile

[in] The GUID to identify the profile.

pchDesc

[in, size_is(cchDesc)] The description of the profile.

[in] cchDesc

[in] The length of pchDesc.

pchIconFile

[in, size_is(cchFile] The full path of the icon file.

[in] cchFile

[in] The length of pchIconFile.

[in] uIconIndex

[in] The icon index of the icon file for this profile.

[in] hklsubstitute

[in] The substitute hkl of this profile.

[in] dwPreferredLayout

[in] Unused. this must be 0.

[in] bEnabledByDefault

[in] True if this profile is enabled by default.

[in] dwFlags

[in] The combination of the following bits:

Value Meaning
TF_RP_HIDDENINSETTINGUI
This profile will not appear in the setting UI.
TF_RP_LOCALPROCESS
This profile is available only on the local process.
TF_RP_LOCALTHREAD
This profile is available only on the local thread.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_FAIL
An unspecified error occurred.
E_INVALIDARG
One or more parameters are invalid.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 R2 [desktop apps | UWP apps]
Target Platform Windows
Header msctf.h
DLL Msctf.dll