interface ICertificatePolicies : IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE Initialize(
/* [in] */ BSTR strPolicy) = 0;
virtual HRESULT STDMETHODCALLTYPE get_Policy(
/* [retval][out] */ BSTR *pstrPolicy) = 0;
virtual HRESULT STDMETHODCALLTYPE put_Policy(
/* [in] */ BSTR strPolicy) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeEncode(
/* [in] */ VARIANT_BOOL bRebuild) = 0;
virtual HRESULT STDMETHODCALLTYPE get_CertEncodeObject(
/* [retval][out] */ IUnknown **ppUnknown) = 0;
virtual HRESULT STDMETHODCALLTYPE get_CertDecodeObject(
/* [in] */ const BSTR strEncodedData,
/* [in] */ EncodingType Encoding,
/* [retval][out] */ IUnknown **ppUnknown) = 0;
virtual HRESULT STDMETHODCALLTYPE get_CertDecodeObjectString(
/* [in] */ const BSTR strEncodedData,
/* [in] */ EncodingType Encoding,
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ IUnknown **ppUnknown) = 0;
virtual HRESULT STDMETHODCALLTYPE get_CertEncodeObjectString(
/* [in] */ IUnknown *pUnknown,
/* [in] */ EncodingType Encoding,
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ BSTR *pstrEncodedData) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeFromCertificate(
/* [in] */ _In_ PCCERT_CONTEXT pCertContext,
/* [in] */ VARIANT_BOOL bBuildChain) = 0;
};
这个接口提供了一些方法,比如 Initialize 用于初始化接口,get_Policy 和 put_Policy 用于获取和设置证书策略等。此外,还有一些方法用于编码和解码证书对象。在使用这个接口时,你可能需要详细查阅 Microsoft 的文档或者相关的示例代码以了解如何正确使用这些方法来处理证书策略。
转载请注明出处:http://www.zyzy.cn/article/detail/24183/Win32 API/Certenroll.h/ICertificatePolicies