ホーム › System.Diagnostics.Debug.ActiveScript › ISimpleConnectionPoint
ISimpleConnectionPoint
COMメソッド 4
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
| pulCount | DWORD* | out | この接続点が公開するイベントの総数を受け取る DWORD へのポインタである。 |
vtbl 4 HRESULT DescribeEvents(DWORD iEvent, DWORD cEvents, INT* prgid, LPWSTR* prgbstr, DWORD* pcEventsFetched)
| iEvent | DWORD | in | 記述を取得する開始イベントのインデックスを指定する。 |
| cEvents | DWORD | in | 記述を取得するイベントの数を指定する。 |
| prgid | INT* | out | 各イベントのディスパッチ ID(memid)を受け取る INT 配列へのポインタである。 |
| prgbstr | LPWSTR* | out | 各イベントの名前を受け取る LPWSTR(BSTR)配列へのポインタである。 |
| pcEventsFetched | DWORD* | out | 実際に記述が取得されたイベント数を受け取る DWORD へのポインタである。 |
| pdisp | IDispatch* | in | イベント通知を受け取るシンクの IDispatch へのポインタである。 |
| pdwCookie | DWORD* | out | 登録を識別し後で解除に使用するクッキー値を受け取る DWORD へのポインタである。 |
| dwCookie | DWORD | in | Advise で取得した、解除する接続を識別するクッキー値を指定する。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ISimpleConnectionPoint "{51973C3E-CB0C-11D0-B5C9-00A0244A0E7A}" #usecom global ISimpleConnectionPoint IID_ISimpleConnectionPoint "{}" #comfunc global ISimpleConnectionPoint_GetEventCount 3 var #comfunc global ISimpleConnectionPoint_DescribeEvents 4 int,int,var,var,var #comfunc global ISimpleConnectionPoint_Advise 5 sptr,var #comfunc global ISimpleConnectionPoint_Unadvise 6 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ISimpleConnectionPoint "{51973C3E-CB0C-11D0-B5C9-00A0244A0E7A}" #usecom global ISimpleConnectionPoint IID_ISimpleConnectionPoint "{}" #comfunc global ISimpleConnectionPoint_GetEventCount 3 sptr #comfunc global ISimpleConnectionPoint_DescribeEvents 4 int,int,sptr,sptr,sptr #comfunc global ISimpleConnectionPoint_Advise 5 sptr,sptr #comfunc global ISimpleConnectionPoint_Unadvise 6 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。