以下是 ICertProperties 接口的一些基本信息:
interface ICertProperties : IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE Initialize(
/* [in] */ EncodingType Encoding,
/* [in] */ VARIANT_BOOL Persist) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeEncode(
/* [in] */ EncodingType Encoding,
/* [in] */ const BSTR str) = 0;
virtual HRESULT STDMETHODCALLTYPE Decode(
/* [in] */ const BSTR str,
/* [in] */ EncodingType Encoding) = 0;
virtual HRESULT STDMETHODCALLTYPE DecodeBlob(
/* [in] */ const BSTR str,
/* [in] */ EncodingType Encoding,
/* [in] */ X500NameFlags NameFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfo(
/* [in] */ CertPropertyID PropertyId,
/* [retval][out] */ BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInfo(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfoBlob(
/* [in] */ CertPropertyID PropertyId,
/* [retval][out] */ BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInfoBlob(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfoFlags(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInfoFlags(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [in] */ const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetStringProperty(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetStringProperty(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [in] */ const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDateProperty(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ DATE *pDateOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetDateProperty(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [in] */ DATE DateIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetLongProperty(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ LONG *pLongOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetLongProperty(
/* [in] */ CertPropertyID PropertyId,
/* [in] */ X500NameFlags NameFlags,
/* [in] */ LONG LongIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTemplate(
/* [retval][out] */ BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetTemplate(
/* [in] */ const BSTR strIn) = 0;
};
这个接口包括了多个方法,用于初始化、编码、解码、获取和设置不同类型的证书属性,例如字符串、日期、长整型等。通过这些方法,你可以对数字证书的属性进行操作。
要正确使用这个接口,你可能需要详细查阅 Microsoft 的文档或者参考相关的示例代码,以了解如何使用这些方法来处理数字证书的属性。
转载请注明出处:http://www.zyzy.cn/article/detail/24184/Win32 API/Certenroll.h/ICertProperties