ホーム › Security.Cryptography.Certificates › ICryptAttributes
ICryptAttributes
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 8
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT get_ItemByIndex(INT Index, ICryptAttribute** pVal)
| Index | INT | in | 取得する暗号属性のコレクション内での 0 始まりのインデックスを指定する。 |
| pVal | ICryptAttribute** | out | 指定インデックスの ICryptAttribute オブジェクトへのポインタを受け取る出力先である。 |
| pVal | INT* | out | コレクションに含まれる暗号属性の個数を受け取る出力先である。 |
| pVal | IUnknown** | out | コレクションを列挙するための IEnumVARIANT 列挙子の IUnknown ポインタを受け取る出力先である。 |
vtbl 10 HRESULT Add(ICryptAttribute* pVal)
| pVal | ICryptAttribute* | inoptional | コレクションに追加する ICryptAttribute オブジェクトへのポインタである。 |
| Index | INT | in | コレクションから削除する暗号属性の 0 始まりのインデックスを指定する。 |
vtbl 12 HRESULT Clear()
| pObjectId | IObjectId* | inoptional | 検索対象となる属性のオブジェクト識別子 (IObjectId) へのポインタである。 |
| pIndex | INT* | out | 一致した属性のコレクション内インデックスを受け取る出力先である。 |
vtbl 14 HRESULT AddRange(ICryptAttributes* pValue)
| pValue | ICryptAttributes* | inoptional | コレクションへまとめて追加する暗号属性のコレクション (ICryptAttributes) へのポインタである。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ICryptAttributes "{728AB32D-217D-11DA-B2A4-000E7BBB2B09}" #usecom global ICryptAttributes IID_ICryptAttributes "{}" #comfunc global ICryptAttributes_get_ItemByIndex 7 int,sptr #comfunc global ICryptAttributes_get_Count 8 var #comfunc global ICryptAttributes_get__NewEnum 9 sptr #comfunc global ICryptAttributes_Add 10 sptr #comfunc global ICryptAttributes_Remove 11 int #comfunc global ICryptAttributes_Clear 12 #comfunc global ICryptAttributes_get_IndexByObjectId 13 sptr,var #comfunc global ICryptAttributes_AddRange 14 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_ICryptAttributes "{728AB32D-217D-11DA-B2A4-000E7BBB2B09}" #usecom global ICryptAttributes IID_ICryptAttributes "{}" #comfunc global ICryptAttributes_get_ItemByIndex 7 int,sptr #comfunc global ICryptAttributes_get_Count 8 sptr #comfunc global ICryptAttributes_get__NewEnum 9 sptr #comfunc global ICryptAttributes_Add 10 sptr #comfunc global ICryptAttributes_Remove 11 int #comfunc global ICryptAttributes_Clear 12 #comfunc global ICryptAttributes_get_IndexByObjectId 13 sptr,sptr #comfunc global ICryptAttributes_AddRange 14 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。