ITfInputProcessorProfileMgr
COM公式ドキュメント
ITfInputProcessorProfileMgr インターフェイスは TSF マネージャーによって実装され、アプリケーションまたはテキストサービスが 1 つ以上のテキストサービスの言語プロファイルを操作するために使用します。
解説(Remarks)
ITfInputProcessorProfiles とは異なり、ITfInputProcessorProfileMgr はキーボードレイアウトとテキストサービスの両方をシームレスに管理できます。Windows Vista では、次のメソッドを使用する代わりに、このインターフェイスを使用することが推奨されます。
- ITfInputProcessorProfiles::Register
- ITfInputProcessorProfiles::Unregister
- ITfInputProcessorProfiles::AddLanguageProfile
- ITfInputProcessorProfiles::RemoveLanguageProfile
- ITfInputProcessorProfiles::EnumInputProcessorInfo
- ITfInputProcessorProfiles::ActivateLanguageProfile
- ITfInputProcessorProfiles::GetActiveLanguageProfile
- ITfInputProcessorProfiles::EnumLanguageProfiles
メソッド 8
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
ITfInputProcessorProfileMgr::ActivateProfile メソッドは、指定されたテキストサービスのプロファイルまたはキーボードレイアウトをアクティブ化します。
| dwProfileType | DWORD | in | [in] このプロファイルの種類。次のいずれかの値です。
| ||||||
| langid | WORD | in | [in] アクティブ化するプロファイルの言語 ID。 | ||||||
| clsid | GUID* | in | [in] アクティブ化するプロファイルのテキストサービスの CLSID。dwProfileType が TF_PROFILETYPE_KEYBOARDLAYOUT の場合は CLSID_NULL でなければなりません。 | ||||||
| guidProfile | GUID* | in | [in] アクティブ化するプロファイルの guidProfile。dwProfileType が TF_PROFILETYPE_KEYBOARDLAYOUT の場合は GUID_NULL でなければなりません。 | ||||||
| hkl | HKL | in | [in] キーボードレイアウトのハンドル。dwProfileType が TF_PROFILETYPE_INPUTPROCESSOR の場合は NULL でなければなりません。 | ||||||
| dwFlags | DWORD | in | 次のビットの組み合わせです。 |
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 言語プロファイルが有効になっていません。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
ITfInputProcessorProfileMgr::DeactivateProfile メソッドは、指定されたテキストサービスのプロファイルまたはキーボードレイアウトを非アクティブ化します。
| dwProfileType | DWORD | in | [in] このプロファイルの種類。次のいずれかの値です。
| ||||||||
| langid | WORD | in | [in] アクティブ化するプロファイルの言語 ID。 | ||||||||
| clsid | GUID* | in | [in] アクティブ化するプロファイルのテキストサービスの CLSID。dwProfileType が TF_PROFILETYPE_KEYBOARDLAYOUT の場合は CLSID_NULL でなければなりません。 | ||||||||
| guidProfile | GUID* | in | [in] アクティブ化するプロファイルの guidProfile。dwProfileType が TF_PROFILETYPE_KEYBOARDLAYOUT の場合は GUID_NULL でなければなりません。 | ||||||||
| hkl | HKL | in | [in] キーボードレイアウトのハンドル。dwProfileType が TF_PROFILETYPE_INPUTPROCESSOR の場合は NULL でなければなりません。 | ||||||||
| dwFlags | DWORD | in | 次のビットの組み合わせです。
|
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
ITfInputProcessorProfileMgr::GetProfile メソッドは、指定されたテキストサービスのプロファイルまたはキーボードレイアウトの情報を TF_INPUTPROCESSORPROFILE 構造体で返します。
| dwProfileType | DWORD | in | [in] このプロファイルの種類。次のいずれかの値です。
| ||||||
| langid | WORD | in | [in] アクティブ化するプロファイルの言語 ID。 | ||||||
| clsid | GUID* | in | [in] アクティブ化するプロファイルのテキストサービスの CLSID。dwProfileType が TF_PROFILETYPE_KEYBOARDLAYOUT の場合は CLSID_NULL でなければなりません。 | ||||||
| guidProfile | GUID* | in | [in] アクティブ化するプロファイルの guidProfile。dwProfileType が TF_PROFILETYPE_KEYBOARDLAYOUT の場合は GUID_NULL でなければなりません。 | ||||||
| hkl | HKL | in | [in] キーボードレイアウトのハンドル。dwProfileType が TF_PROFILETYPE_INPUTPROCESSOR の場合は NULL でなければなりません。 | ||||||
| pProfile | TF_INPUTPROCESSORPROFILE* | out | [out] TF_INPUTPROCESSORPROFILE を受け取るバッファー。 |
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
ITfInputProcessorProfileMgr::EnumProfiles メソッドは、列挙対象のプロファイルを返します。
| langid | WORD | in | [in] 列挙するプロファイルの langid。langid が 0 の場合、すべてのプロファイルが列挙されます。 |
| ppEnum | IEnumTfInputProcessorProfiles** | out | [out] IEnumTfInputProcessorProfiles インターフェイスへのポインターを受け取るポインター。 |
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
ITfInputProcessorProfileMgr::ReleaseInputProcessor メソッドは、指定された CLSID のテキストサービスに属するプロファイルを非アクティブ化し、ITfTextInputProcessorEx インターフェイスのインスタンスを解放します。
| rclsid | GUID* | in | [in] 解放するテキストサービスの CLSID。 | ||||
| dwFlags | DWORD | in | [in]
|
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
ITfInputProcessorProfileMgr::RegisterProfile メソッドは、テキストサービスとそのプロファイルを登録します。
| rclsid | GUID* | in | [in] テキストサービスの CLSID。 | ||||||||
| langid | WORD | in | [in] プロファイルの言語 ID。 | ||||||||
| guidProfile | GUID* | in | [in] プロファイルを識別する GUID。 | ||||||||
| pchDesc | LPWSTR | in | [in, size_is(cchDesc)] プロファイルの説明。 | ||||||||
| cchDesc | DWORD | in | [in] pchDesc の長さ。 | ||||||||
| pchIconFile | LPWSTR | in | [in, size_is(cchFile] アイコンファイルのフルパス。 | ||||||||
| cchFile | DWORD | in | [in] pchIconFile の長さ。 | ||||||||
| uIconIndex | DWORD | in | [in] このプロファイルに使用する、アイコンファイル内のアイコンのインデックス。 | ||||||||
| hklsubstitute | HKL | in | [in] このプロファイルの代替 hkl。 | ||||||||
| dwPreferredLayout | DWORD | in | [in] 未使用。0 でなければなりません。 | ||||||||
| bEnabledByDefault | BOOL | in | [in] このプロファイルを既定で有効にする場合は True。 | ||||||||
| dwFlags | DWORD | in | [in] 次のビットの組み合わせです。
|
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
ITfInputProcessorProfileMgr::UnregisterProfile メソッドは、テキストサービスとそのプロファイルの登録を解除します。
| rclsid | GUID* | in | [in] テキストサービスの CLSID。 | ||||||||
| langid | WORD | in | [in] プロファイルの言語 ID。 | ||||||||
| guidProfile | GUID* | in | [in] プロファイルを識別する GUID。 | ||||||||
| dwFlags | DWORD | in | [in] 次のビットの組み合わせです。
|
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
このメソッドは、現在アクティブなプロファイルを返します。
| catid | GUID* | in | [in] プロファイルのカテゴリ ID。GUID_TFCAT_TIP_KEYBOARD でなければなりません。サポートされるのは GUID_TFCAT_TIP_KEYBOARD のみです。 |
| pProfile | TF_INPUTPROCESSORPROFILE* | out | [out] プロファイル情報を受け取るバッファー。 |
戻り値
このメソッドは次のいずれかの値を返します。
| 値 | 説明 |
|---|---|
| メソッドは成功しました。 | |
| プロファイルが見つからないか、アクティブではありません。 | |
| 不特定のエラーが発生しました。 | |
| 1 つ以上の引数が無効です。 |
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
#define global IID_ITfInputProcessorProfileMgr "{71C6E74C-0F28-11D8-A82A-00065B84435C}" #usecom global ITfInputProcessorProfileMgr IID_ITfInputProcessorProfileMgr "{}" #comfunc global ITfInputProcessorProfileMgr_ActivateProfile 3 int,int,var,var,sptr,int #comfunc global ITfInputProcessorProfileMgr_DeactivateProfile 4 int,int,var,var,sptr,int #comfunc global ITfInputProcessorProfileMgr_GetProfile 5 int,int,var,var,sptr,var #comfunc global ITfInputProcessorProfileMgr_EnumProfiles 6 int,sptr #comfunc global ITfInputProcessorProfileMgr_ReleaseInputProcessor 7 var,int #comfunc global ITfInputProcessorProfileMgr_RegisterProfile 8 var,int,var,wstr,int,wstr,int,int,sptr,int,int,int #comfunc global ITfInputProcessorProfileMgr_UnregisterProfile 9 var,int,var,int #comfunc global ITfInputProcessorProfileMgr_GetActiveProfile 10 var,var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ITfInputProcessorProfileMgr "{71C6E74C-0F28-11D8-A82A-00065B84435C}" #usecom global ITfInputProcessorProfileMgr IID_ITfInputProcessorProfileMgr "{}" #comfunc global ITfInputProcessorProfileMgr_ActivateProfile 3 int,int,sptr,sptr,sptr,int #comfunc global ITfInputProcessorProfileMgr_DeactivateProfile 4 int,int,sptr,sptr,sptr,int #comfunc global ITfInputProcessorProfileMgr_GetProfile 5 int,int,sptr,sptr,sptr,sptr #comfunc global ITfInputProcessorProfileMgr_EnumProfiles 6 int,sptr #comfunc global ITfInputProcessorProfileMgr_ReleaseInputProcessor 7 sptr,int #comfunc global ITfInputProcessorProfileMgr_RegisterProfile 8 sptr,int,sptr,wstr,int,wstr,int,int,sptr,int,int,int #comfunc global ITfInputProcessorProfileMgr_UnregisterProfile 9 sptr,int,sptr,int #comfunc global ITfInputProcessorProfileMgr_GetActiveProfile 10 sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。