ITfInputProcessorProfiles::AddLanguageProfile method (msctf.h)

Creates a language profile that consists of a specific text service and a specific language identifier.

Syntax

HRESULT AddLanguageProfile(
  [in] REFCLSID    rclsid,
  [in] LANGID      langid,
  [in] REFGUID     guidProfile,
  [in] const WCHAR *pchDesc,
  [in] ULONG       cchDesc,
  [in] const WCHAR *pchIconFile,
  [in] ULONG       cchFile,
  [in] ULONG       uIconIndex
);

Parameters

[in] rclsid

Contains the text service CLSID.

[in] langid

Contains a LANGID value that specifies the language identifier of the profile that the text service is added to. If this contains -1, the text service is added to all languages.

[in] guidProfile

Contains a GUID value that identifies the language profile. This is the value obtained by ITfInputProcessorProfiles::GetActiveLanguageProfile when the profile is active.

[in] pchDesc

Pointer to a WCHAR buffer that contains the description string for the text service in the profile. This is the text service name displayed in the language bar.

[in] cchDesc

Contains the length, in characters, of the description string in pchDesc. If this contains -1, pchDesc is assumed to be a NULL-terminated string.

[in] pchIconFile

Pointer to a WCHAR buffer that contains the path and file name of the file that contains the icon to be displayed in the language bar for the text service in the profile. This file can be an executable (.exe), DLL (.dll) or icon (.ico) file.

This parameter is optional and can be NULL. In this case, a default icon is displayed for the text service.

[in] cchFile

Contains the length, in characters, of the icon file string in pchIconFile. If this contains -1, pchIconFile is assumed to be a NULL-terminated string. This parameter is ignored if pchIconFile is NULL.

[in] uIconIndex

Contains the zero-based index of the icon in pchIconFile to be displayed in the language bar for the text service in the profile. This parameter is ignored if pchIconFile is NULL.

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
pszDesc is invalid.

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 Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfInputProcessorProfiles

ITfInputProcessorProfiles::GetActiveLanguageProfile