ホーム › Security.Cryptography.Certificates › ICertServerPolicy
ICertServerPolicy
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 14
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
| Context | INT | in | 操作対象となる要求のコンテキストハンドル (値) を指定する。 |
vtbl 8 HRESULT GetRequestProperty(LPWSTR strPropertyName, INT PropertyType, VARIANT* pvarPropertyValue)
| strPropertyName | LPWSTR | in | 取得する要求プロパティの名前を指定する。 |
| PropertyType | INT | in | 取得する値のデータ型 (PROPTYPE_*) を指定する。 |
| pvarPropertyValue | VARIANT* | out | 要求プロパティの値を受け取る VARIANT へのポインタである。 |
| strAttributeName | LPWSTR | in | 取得する要求属性の名前を指定する。 |
| pstrAttributeValue | LPWSTR* | out | 要求属性の値を受け取る文字列ポインタである。 |
vtbl 10 HRESULT GetCertificateProperty(LPWSTR strPropertyName, CERT_PROPERTY_TYPE PropertyType, VARIANT* pvarPropertyValue)
| strPropertyName | LPWSTR | in | 取得する証明書プロパティの名前を指定する。 |
| PropertyType | CERT_PROPERTY_TYPE | in | 取得する値のデータ型を表す CERT_PROPERTY_TYPE を指定する。 |
| pvarPropertyValue | VARIANT* | out | 証明書プロパティの値を受け取る VARIANT へのポインタである。 |
vtbl 11 HRESULT SetCertificateProperty(LPWSTR strPropertyName, INT PropertyType, VARIANT* pvarPropertyValue)
| strPropertyName | LPWSTR | in | 設定する証明書プロパティの名前を指定する。 |
| PropertyType | INT | in | 設定する値のデータ型 (PROPTYPE_*) を指定する。 |
| pvarPropertyValue | VARIANT* | in | 証明書プロパティに設定する値を格納した VARIANT へのポインタである。 |
vtbl 12 HRESULT GetCertificateExtension(LPWSTR strExtensionName, CERT_PROPERTY_TYPE Type, VARIANT* pvarValue)
| strExtensionName | LPWSTR | in | 取得する証明書拡張の OID または名前を指定する。 |
| Type | CERT_PROPERTY_TYPE | in | 取得する値のデータ型を表す CERT_PROPERTY_TYPE を指定する。 |
| pvarValue | VARIANT* | out | 証明書拡張の値を受け取る VARIANT へのポインタである。 |
| pExtFlags | INT* | out | 現在の証明書拡張のフラグ (重要度など) を受け取る INT へのポインタである。 |
vtbl 14 HRESULT SetCertificateExtension(LPWSTR strExtensionName, INT Type, INT ExtFlags, VARIANT* pvarValue)
| strExtensionName | LPWSTR | in | 設定する証明書拡張の OID または名前を指定する。 |
| Type | INT | in | 設定する値のデータ型 (PROPTYPE_*) を指定する。 |
| ExtFlags | INT | in | 拡張に適用するフラグ (重要度など) を指定する。 |
| pvarValue | VARIANT* | in | 証明書拡張に設定する値を格納した VARIANT へのポインタである。 |
| Flags | INT | in | 拡張の列挙動作を制御するフラグを指定する。予約済みで通常は 0 を指定する。 |
| pstrExtensionName | LPWSTR* | out | 列挙された次の証明書拡張の名前を受け取る文字列ポインタである。 |
vtbl 17 HRESULT EnumerateExtensionsClose()
| Flags | INT | in | 属性の列挙動作を制御するフラグを指定する。予約済みで通常は 0 を指定する。 |
| pstrAttributeName | LPWSTR* | out | 列挙された次の要求属性の名前を受け取る文字列ポインタである。 |
vtbl 20 HRESULT EnumerateAttributesClose()
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ICertServerPolicy "{AA000922-FFBE-11CF-8800-00A0C903B83C}" #usecom global ICertServerPolicy IID_ICertServerPolicy "{}" #comfunc global ICertServerPolicy_SetContext 7 int #comfunc global ICertServerPolicy_GetRequestProperty 8 wstr,int,var #comfunc global ICertServerPolicy_GetRequestAttribute 9 wstr,var #comfunc global ICertServerPolicy_GetCertificateProperty 10 wstr,int,var #comfunc global ICertServerPolicy_SetCertificateProperty 11 wstr,int,var #comfunc global ICertServerPolicy_GetCertificateExtension 12 wstr,int,var #comfunc global ICertServerPolicy_GetCertificateExtensionFlags 13 var #comfunc global ICertServerPolicy_SetCertificateExtension 14 wstr,int,int,var #comfunc global ICertServerPolicy_EnumerateExtensionsSetup 15 int #comfunc global ICertServerPolicy_EnumerateExtensions 16 var #comfunc global ICertServerPolicy_EnumerateExtensionsClose 17 #comfunc global ICertServerPolicy_EnumerateAttributesSetup 18 int #comfunc global ICertServerPolicy_EnumerateAttributes 19 var #comfunc global ICertServerPolicy_EnumerateAttributesClose 20 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_ICertServerPolicy "{AA000922-FFBE-11CF-8800-00A0C903B83C}" #usecom global ICertServerPolicy IID_ICertServerPolicy "{}" #comfunc global ICertServerPolicy_SetContext 7 int #comfunc global ICertServerPolicy_GetRequestProperty 8 wstr,int,sptr #comfunc global ICertServerPolicy_GetRequestAttribute 9 wstr,sptr #comfunc global ICertServerPolicy_GetCertificateProperty 10 wstr,int,sptr #comfunc global ICertServerPolicy_SetCertificateProperty 11 wstr,int,sptr #comfunc global ICertServerPolicy_GetCertificateExtension 12 wstr,int,sptr #comfunc global ICertServerPolicy_GetCertificateExtensionFlags 13 sptr #comfunc global ICertServerPolicy_SetCertificateExtension 14 wstr,int,int,sptr #comfunc global ICertServerPolicy_EnumerateExtensionsSetup 15 int #comfunc global ICertServerPolicy_EnumerateExtensions 16 sptr #comfunc global ICertServerPolicy_EnumerateExtensionsClose 17 #comfunc global ICertServerPolicy_EnumerateAttributesSetup 18 int #comfunc global ICertServerPolicy_EnumerateAttributes 19 sptr #comfunc global ICertServerPolicy_EnumerateAttributesClose 20 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。