ホーム › Media.LibrarySharingServices › IWindowsMediaLibrarySharingDevices
IWindowsMediaLibrarySharingDevices
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 3
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT get_Item(INT index, IWindowsMediaLibrarySharingDevice** device)
| index | INT | in | 取得するデバイスの 0 始まりインデックスを指定する。 |
| device | IWindowsMediaLibrarySharingDevice** | out | 指定インデックスの IWindowsMediaLibrarySharingDevice を受け取るポインタの格納先。 |
| count | INT* | out | コレクション内のデバイス数を受け取る INT ポインタ。 |
vtbl 9 HRESULT GetDevice(LPWSTR deviceID, IWindowsMediaLibrarySharingDevice** device)
| deviceID | LPWSTR | in | 取得するデバイスの ID 文字列を指す広文字列を指定する。 |
| device | IWindowsMediaLibrarySharingDevice** | out | 該当する IWindowsMediaLibrarySharingDevice を受け取るポインタの格納先。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IWindowsMediaLibrarySharingDevices "{1803F9D6-FE6D-4546-BF5B-992FE8EC12D1}" #usecom global IWindowsMediaLibrarySharingDevices IID_IWindowsMediaLibrarySharingDevices "{}" #comfunc global IWindowsMediaLibrarySharingDevices_get_Item 7 int,sptr #comfunc global IWindowsMediaLibrarySharingDevices_get_Count 8 var #comfunc global IWindowsMediaLibrarySharingDevices_GetDevice 9 wstr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IWindowsMediaLibrarySharingDevices "{1803F9D6-FE6D-4546-BF5B-992FE8EC12D1}" #usecom global IWindowsMediaLibrarySharingDevices IID_IWindowsMediaLibrarySharingDevices "{}" #comfunc global IWindowsMediaLibrarySharingDevices_get_Item 7 int,sptr #comfunc global IWindowsMediaLibrarySharingDevices_get_Count 8 sptr #comfunc global IWindowsMediaLibrarySharingDevices_GetDevice 9 wstr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。