ホーム › Security.Cryptography.Certificates › ISignerCertificate
ISignerCertificate
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 11
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT Initialize(VARIANT_BOOL MachineContext, X509PrivateKeyVerify VerifyType, EncodingType Encoding, LPWSTR strCertificate)
| MachineContext | VARIANT_BOOL | in | 署名証明書をマシン(コンピューター)コンテキストで扱うかどうかを指定する。VARIANT_TRUE でマシンストア、VARIANT_FALSE でユーザーストアを使用する。 |
| VerifyType | X509PrivateKeyVerify | in | 署名に使用する秘密鍵の検証方法を指定する X509PrivateKeyVerify 列挙値である。 |
| Encoding | EncodingType | in | strCertificate に渡す証明書文字列のエンコーディング種別を指定する EncodingType 列挙値である。 |
| strCertificate | LPWSTR | in | 署名に使用する証明書を、指定エンコーディングで表した文字列として渡す。 |
vtbl 8 HRESULT get_Certificate(EncodingType Encoding, LPWSTR* pValue)
| Encoding | EncodingType | in | 取得する証明書文字列のエンコーディング種別を指定する EncodingType 列挙値である。 |
| pValue | LPWSTR* | out | 署名証明書を指定エンコーディングの文字列として受け取るポインタである。 |
vtbl 9 HRESULT get_PrivateKey(IX509PrivateKey** ppValue)
| ppValue | IX509PrivateKey** | out | 署名証明書に対応する秘密鍵を表す IX509PrivateKey オブジェクトを受け取るポインタである。 |
vtbl 10 HRESULT get_Silent(VARIANT_BOOL* pValue)
| pValue | VARIANT_BOOL* | out | サイレント(UI を抑制する)モードが有効かどうかを表す VARIANT_BOOL を受け取るポインタである。 |
vtbl 11 HRESULT put_Silent(VARIANT_BOOL Value)
| Value | VARIANT_BOOL | in | UI を表示しないサイレントモードの有効・無効を VARIANT_BOOL で指定する。 |
| pValue | INT* | out | UI 表示時の親ウィンドウハンドル(INT として扱う)を受け取るポインタである。 |
| Value | INT | in | UI 表示時の親ウィンドウハンドルを INT として指定する。 |
| pValue | LPWSTR* | out | UI に表示するコンテキストメッセージ文字列を受け取るポインタである。 |
| Value | LPWSTR | in | UI に表示するコンテキストメッセージ文字列を指定する。 |
| Value | LPWSTR | in | 秘密鍵へアクセスするための PIN(暗証番号)を文字列で指定する。 |
vtbl 17 HRESULT get_SignatureInformation(IX509SignatureInformation** ppValue)
| ppValue | IX509SignatureInformation** | out | 署名アルゴリズム等の署名情報を表す IX509SignatureInformation オブジェクトを受け取るポインタである。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ISignerCertificate "{728AB33D-217D-11DA-B2A4-000E7BBB2B09}" #usecom global ISignerCertificate IID_ISignerCertificate "{}" #comfunc global ISignerCertificate_Initialize 7 int,int,int,wstr #comfunc global ISignerCertificate_get_Certificate 8 int,var #comfunc global ISignerCertificate_get_PrivateKey 9 sptr #comfunc global ISignerCertificate_get_Silent 10 var #comfunc global ISignerCertificate_put_Silent 11 int #comfunc global ISignerCertificate_get_ParentWindow 12 var #comfunc global ISignerCertificate_put_ParentWindow 13 int #comfunc global ISignerCertificate_get_UIContextMessage 14 var #comfunc global ISignerCertificate_put_UIContextMessage 15 wstr #comfunc global ISignerCertificate_put_Pin 16 wstr #comfunc global ISignerCertificate_get_SignatureInformation 17 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_ISignerCertificate "{728AB33D-217D-11DA-B2A4-000E7BBB2B09}" #usecom global ISignerCertificate IID_ISignerCertificate "{}" #comfunc global ISignerCertificate_Initialize 7 int,int,int,wstr #comfunc global ISignerCertificate_get_Certificate 8 int,sptr #comfunc global ISignerCertificate_get_PrivateKey 9 sptr #comfunc global ISignerCertificate_get_Silent 10 sptr #comfunc global ISignerCertificate_put_Silent 11 int #comfunc global ISignerCertificate_get_ParentWindow 12 sptr #comfunc global ISignerCertificate_put_ParentWindow 13 int #comfunc global ISignerCertificate_get_UIContextMessage 14 sptr #comfunc global ISignerCertificate_put_UIContextMessage 15 wstr #comfunc global ISignerCertificate_put_Pin 16 wstr #comfunc global ISignerCertificate_get_SignatureInformation 17 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。