ホーム › Security.Cryptography.Certificates › ICertProperties
ICertProperties
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 7
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT get_ItemByIndex(INT Index, ICertProperty** pVal)
| Index | INT | in | 取得する証明書プロパティのコレクション内での 0 始まりのインデックスを指定する。 |
| pVal | ICertProperty** | out | 指定インデックスの ICertProperty オブジェクトへのポインタを受け取る出力先である。 |
| pVal | INT* | out | コレクションに含まれる証明書プロパティの個数を受け取る出力先である。 |
| pVal | IUnknown** | out | コレクションを列挙するための IEnumVARIANT 列挙子の IUnknown ポインタを受け取る出力先である。 |
vtbl 10 HRESULT Add(ICertProperty* pVal)
| pVal | ICertProperty* | inoptional | コレクションに追加する ICertProperty オブジェクトへのポインタである。 |
| Index | INT | in | コレクションから削除する証明書プロパティの 0 始まりのインデックスを指定する。 |
vtbl 12 HRESULT Clear()
vtbl 13 HRESULT InitializeFromCertificate(VARIANT_BOOL MachineContext, EncodingType Encoding, LPWSTR strCertificate)
| MachineContext | VARIANT_BOOL | in | コンピューター コンテキストの証明書を対象とするか否かを指定する。VARIANT_TRUE でコンピューター コンテキストを使用する。 |
| Encoding | EncodingType | in | strCertificate のエンコード形式を指定する EncodingType 値である。 |
| strCertificate | LPWSTR | in | プロパティ コレクションの取得元となる証明書をエンコードした文字列である。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ICertProperties "{728AB32F-217D-11DA-B2A4-000E7BBB2B09}" #usecom global ICertProperties IID_ICertProperties "{}" #comfunc global ICertProperties_get_ItemByIndex 7 int,sptr #comfunc global ICertProperties_get_Count 8 var #comfunc global ICertProperties_get__NewEnum 9 sptr #comfunc global ICertProperties_Add 10 sptr #comfunc global ICertProperties_Remove 11 int #comfunc global ICertProperties_Clear 12 #comfunc global ICertProperties_InitializeFromCertificate 13 int,int,wstr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_ICertProperties "{728AB32F-217D-11DA-B2A4-000E7BBB2B09}" #usecom global ICertProperties IID_ICertProperties "{}" #comfunc global ICertProperties_get_ItemByIndex 7 int,sptr #comfunc global ICertProperties_get_Count 8 sptr #comfunc global ICertProperties_get__NewEnum 9 sptr #comfunc global ICertProperties_Add 10 sptr #comfunc global ICertProperties_Remove 11 int #comfunc global ICertProperties_Clear 12 #comfunc global ICertProperties_InitializeFromCertificate 13 int,int,wstr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。