ホーム › Devices.PortableDevices › IPortableDevicePropVariantCollection
IPortableDevicePropVariantCollection
COMメソッド 7
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
| pcElems | DWORD* | in | コレクション内の値の総数を受け取る出力先。 |
vtbl 4 HRESULT GetAt(DWORD dwIndex, PROPVARIANT* pValue)
| dwIndex | DWORD | in | 取得する値の0始まりのインデックス。 |
| pValue | PROPVARIANT* | in | 指定位置のPROPVARIANT値を受け取る出力先。 |
vtbl 5 HRESULT Add(PROPVARIANT* pValue)
| pValue | PROPVARIANT* | in | コレクションに追加するPROPVARIANT値へのポインタ。 |
| pvt | WORD* | out | コレクションが保持する要素のVARTYPE(値の型)を受け取る出力先。 |
| vt | WORD | in | 全要素を変換する対象のVARTYPE(値の型)。 |
vtbl 8 HRESULT Clear()
| dwIndex | DWORD | in | 削除する値の0始まりのインデックス。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IPortableDevicePropVariantCollection "{89B2E422-4F1B-4316-BCEF-A44AFEA83EB3}" #usecom global IPortableDevicePropVariantCollection IID_IPortableDevicePropVariantCollection "{08A99E2F-6D6D-4B80-AF5A-BAF2BCBE4CB9}" #comfunc global IPortableDevicePropVariantCollection_GetCount 3 var #comfunc global IPortableDevicePropVariantCollection_GetAt 4 int,var #comfunc global IPortableDevicePropVariantCollection_Add 5 var #comfunc global IPortableDevicePropVariantCollection_GetType 6 var #comfunc global IPortableDevicePropVariantCollection_ChangeType 7 int #comfunc global IPortableDevicePropVariantCollection_Clear 8 #comfunc global IPortableDevicePropVariantCollection_RemoveAt 9 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。#define global IID_IPortableDevicePropVariantCollection "{89B2E422-4F1B-4316-BCEF-A44AFEA83EB3}" #usecom global IPortableDevicePropVariantCollection IID_IPortableDevicePropVariantCollection "{08A99E2F-6D6D-4B80-AF5A-BAF2BCBE4CB9}" #comfunc global IPortableDevicePropVariantCollection_GetCount 3 sptr #comfunc global IPortableDevicePropVariantCollection_GetAt 4 int,sptr #comfunc global IPortableDevicePropVariantCollection_Add 5 sptr #comfunc global IPortableDevicePropVariantCollection_GetType 6 sptr #comfunc global IPortableDevicePropVariantCollection_ChangeType 7 int #comfunc global IPortableDevicePropVariantCollection_Clear 8 #comfunc global IPortableDevicePropVariantCollection_RemoveAt 9 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。