ホーム › Devices.PortableDevices › IPortableDeviceValuesCollection
IPortableDeviceValuesCollection
COM公式ドキュメント
IPortableDeviceValuesCollection インターフェイスは、0 から始まるインデックス付きの IPortableDeviceValues インターフェイスのコレクションを保持します。
解説(Remarks)
IPortableDeviceValuesCollection インターフェイスは、0 から始まるインデックス付きの IPortableDeviceValues インターフェイスのコレクションを保持します。このインターフェイスはメソッドから取得できます。新しいオブジェクトが必要な場合は、CLSID_PortableDeviceValuesCollection を指定して CoCreate を呼び出します。
メソッド 5
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
コレクション内の項目数を取得します。
| pcElems | DWORD* | in | コレクション内のIPortableDeviceValues要素の総数を受け取る出力先。 |
vtbl 4 HRESULT GetAt(DWORD dwIndex, IPortableDeviceValues** ppValues)
0 から始まるインデックスによってコレクションから項目を取得します。
| dwIndex | DWORD | in | 取得する要素の0始まりのインデックス。 |
| ppValues | IPortableDeviceValues** | out | 指定位置のIPortableDeviceValuesを受け取る出力先。 |
vtbl 5 HRESULT Add(IPortableDeviceValues* pValues)
コレクションに項目を追加します。
| pValues | IPortableDeviceValues* | in | コレクションに追加するIPortableDeviceValuesへのポインタ。 |
vtbl 6 HRESULT Clear()
コレクションからすべての項目を解放します。
指定されたインデックスで示される位置に格納されている要素を削除します。
| dwIndex | DWORD | in | 削除する要素の0始まりのインデックス。 |
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp)
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IPortableDeviceValuesCollection "{6E3F2D79-4E07-48C4-8208-D8C2E5AF4A99}" #usecom global IPortableDeviceValuesCollection IID_IPortableDeviceValuesCollection "{3882134D-14CF-4220-9CB4-435F86D83F60}" #comfunc global IPortableDeviceValuesCollection_GetCount 3 var #comfunc global IPortableDeviceValuesCollection_GetAt 4 int,sptr #comfunc global IPortableDeviceValuesCollection_Add 5 sptr #comfunc global IPortableDeviceValuesCollection_Clear 6 #comfunc global IPortableDeviceValuesCollection_RemoveAt 7 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_IPortableDeviceValuesCollection "{6E3F2D79-4E07-48C4-8208-D8C2E5AF4A99}" #usecom global IPortableDeviceValuesCollection IID_IPortableDeviceValuesCollection "{3882134D-14CF-4220-9CB4-435F86D83F60}" #comfunc global IPortableDeviceValuesCollection_GetCount 3 sptr #comfunc global IPortableDeviceValuesCollection_GetAt 4 int,sptr #comfunc global IPortableDeviceValuesCollection_Add 5 sptr #comfunc global IPortableDeviceValuesCollection_Clear 6 #comfunc global IPortableDeviceValuesCollection_RemoveAt 7 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。