ホーム › Media.PictureAcquisition › IPhotoAcquireSource
IPhotoAcquireSource
COMメソッド 8
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
| pbstrFriendlyName | LPWSTR* | out | 取得元デバイスの表示名を受け取る出力先。 |
| nSize | DWORD | in | 要求するアイコンの基準サイズ(ピクセル)。 |
| phLargeIcon | HICON* | inoutoptional | 大アイコンのHICONを受け取る出力先。 |
| phSmallIcon | HICON* | inoutoptional | 小アイコンのHICONを受け取る出力先。 |
vtbl 5 HRESULT InitializeItemList(BOOL fForceEnumeration, IPhotoAcquireProgressCB* pPhotoAcquireProgressCB, DWORD* pnItemCount)
| fForceEnumeration | BOOL | in | キャッシュを無視して再列挙を強制するか否かを示すBOOL。 |
| pPhotoAcquireProgressCB | IPhotoAcquireProgressCB* | inoptional | 列挙進捗を通知するIPhotoAcquireProgressCBポインタ。NULL可。 |
| pnItemCount | DWORD* | inoutoptional | 列挙されたアイテム数を受け取る出力先。 |
| pnItemCount | DWORD* | out | 取得元が持つアイテム数を受け取る出力先。 |
vtbl 7 HRESULT GetItemAt(DWORD nIndex, IPhotoAcquireItem** ppPhotoAcquireItem)
| nIndex | DWORD | in | 取得するアイテムの0始まりインデックス。 |
| ppPhotoAcquireItem | IPhotoAcquireItem** | out | 指定アイテムのIPhotoAcquireItemを受け取る出力先。 |
vtbl 8 HRESULT GetPhotoAcquireSettings(IPhotoAcquireSettings** ppPhotoAcquireSettings)
| ppPhotoAcquireSettings | IPhotoAcquireSettings** | out | 取得元に関連する設定オブジェクトIPhotoAcquireSettingsを受け取る出力先。 |
| pbstrDeviceId | LPWSTR* | out | 取得元デバイスを一意に識別するデバイスIDを受け取る出力先。 |
vtbl 10 HRESULT BindToObject(GUID* riid, void** ppv)
| riid | GUID* | in | バインドして取得するインターフェイスのIID。 |
| ppv | void** | out | 取得したインターフェイスポインタを受け取る出力先。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IPhotoAcquireSource "{00F2C703-8613-4282-A53B-6EC59C5883AC}" #usecom global IPhotoAcquireSource IID_IPhotoAcquireSource "{}" #comfunc global IPhotoAcquireSource_GetFriendlyName 3 var #comfunc global IPhotoAcquireSource_GetDeviceIcons 4 int,sptr,sptr #comfunc global IPhotoAcquireSource_InitializeItemList 5 int,sptr,var #comfunc global IPhotoAcquireSource_GetItemCount 6 var #comfunc global IPhotoAcquireSource_GetItemAt 7 int,sptr #comfunc global IPhotoAcquireSource_GetPhotoAcquireSettings 8 sptr #comfunc global IPhotoAcquireSource_GetDeviceId 9 var #comfunc global IPhotoAcquireSource_BindToObject 10 var,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_IPhotoAcquireSource "{00F2C703-8613-4282-A53B-6EC59C5883AC}" #usecom global IPhotoAcquireSource IID_IPhotoAcquireSource "{}" #comfunc global IPhotoAcquireSource_GetFriendlyName 3 sptr #comfunc global IPhotoAcquireSource_GetDeviceIcons 4 int,sptr,sptr #comfunc global IPhotoAcquireSource_InitializeItemList 5 int,sptr,sptr #comfunc global IPhotoAcquireSource_GetItemCount 6 sptr #comfunc global IPhotoAcquireSource_GetItemAt 7 int,sptr #comfunc global IPhotoAcquireSource_GetPhotoAcquireSettings 8 sptr #comfunc global IPhotoAcquireSource_GetDeviceId 9 sptr #comfunc global IPhotoAcquireSource_BindToObject 10 sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。