IProviderPropertyConstraintCollection
COM公式ドキュメント
このインターフェイスは、IFunctionDiscoveryProviderQuery::GetPropertyConstraints を通じてプロバイダーからアクセスできます。
メソッド 6
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
コレクション内の項目数を取得します。(IProviderPropertyConstraintCollection.GetCount)
| pdwCount | DWORD* | out | 項目数。 |
戻り値
戻り値には次のものが含まれますが、これらに限定されません。
| 戻り値 | 説明 |
|---|---|
| メソッドは正常に完了しました。 |
指定したプロパティ制約の名前と値を、プロパティキーを使用して取得します。
| Key | PROPERTYKEY* | in | プロパティキー。 |
| pPropVar | PROPVARIANT* | out | プロパティキー制約値に使用する VARIANT。 |
| pdwPropertyConstraint | DWORD* | out | 適用する制約の種類。 |
戻り値
戻り値には次のものが含まれますが、これらに限定されません。
| 戻り値 | 説明 |
|---|---|
| メソッドは正常に完了しました。 | |
| メソッドは正常に完了しましたが、プロパティキーがコレクション内で見つかりませんでした。 | |
| ppropVar パラメーターまたは pdwPropertyConstraint パラメーターが NULL です。 |
指定したプロパティ制約の名前と値を、インデックスを使用して取得します。
| dwIndex | DWORD | in | コレクション内の項目のインデックス。 |
| pKey | PROPERTYKEY* | out | プロパティキー。 |
| pPropVar | PROPVARIANT* | out | プロパティ制約データに使用する PROPVARIANT。 |
| pdwPropertyConstraint | DWORD* | out | 適用する制約の種類。 |
戻り値
戻り値には次のものが含まれますが、これらに限定されません。
| 戻り値 | 説明 |
|---|---|
| メソッドは正常に完了しました。 | |
| ppropVar パラメーターまたは pdwPropertyConstraint パラメーターが NULL です。 |
コレクション内の次のプロパティ制約の名前と値を取得します。
| pKey | PROPERTYKEY* | out | プロパティキー。 |
| pPropVar | PROPVARIANT* | out | プロパティ制約データに使用する PROPVARIANT。 |
| pdwPropertyConstraint | DWORD* | out | 適用する制約の種類。 |
戻り値
戻り値には次のものが含まれますが、これらに限定されません。
| 戻り値 | 説明 |
|---|---|
| メソッドは正常に完了しました。 | |
| ppropVar パラメーターまたは pdwPropertyConstraint パラメーターが NULL です。 |
コレクション内の次の項目をスキップします。(IProviderPropertyConstraintCollection.Skip)
戻り値
このメソッドが成功すると S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
現在のインデックスをコレクションの先頭にリセットします。(IProviderPropertyConstraintCollection.Reset)
戻り値
このメソッドが成功すると S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
#define global IID_IProviderPropertyConstraintCollection "{F4FAE42F-5778-4A13-8540-B5FD8C1398DD}" #usecom global IProviderPropertyConstraintCollection IID_IProviderPropertyConstraintCollection "{}" #comfunc global IProviderPropertyConstraintCollection_GetCount 3 var #comfunc global IProviderPropertyConstraintCollection_Get 4 var,var,var #comfunc global IProviderPropertyConstraintCollection_Item 5 int,var,var,var #comfunc global IProviderPropertyConstraintCollection_Next 6 var,var,var #comfunc global IProviderPropertyConstraintCollection_Skip 7 #comfunc global IProviderPropertyConstraintCollection_Reset 8 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。#define global IID_IProviderPropertyConstraintCollection "{F4FAE42F-5778-4A13-8540-B5FD8C1398DD}" #usecom global IProviderPropertyConstraintCollection IID_IProviderPropertyConstraintCollection "{}" #comfunc global IProviderPropertyConstraintCollection_GetCount 3 sptr #comfunc global IProviderPropertyConstraintCollection_Get 4 sptr,sptr,sptr #comfunc global IProviderPropertyConstraintCollection_Item 5 int,sptr,sptr,sptr #comfunc global IProviderPropertyConstraintCollection_Next 6 sptr,sptr,sptr #comfunc global IProviderPropertyConstraintCollection_Skip 7 #comfunc global IProviderPropertyConstraintCollection_Reset 8 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。