Platform SDK: Certificate Enrollment Control

ICEnroll3::InstallPKCS7 [C++]

CEnroll.InstallPKCS7 [Visual Basic]

The InstallPKCS7 method processes a certificate or chain of certificates, placing them into the appropriate certificate store(s).

[Visual Basic]
objEnroll.InstallPKCS7(PKCS7 As String)
[C++]
HRESULT InstallPKCS7(
  BSTR  PKCS7
);

Parameters

[Visual Basic] objEnroll
Object expression that resolves to a CEnroll object.
[Visual Basic,C++] PKCS7
String containing a certificate or chain of certificates.

Return Values

[Visual Basic] None.

[C++] The return value is an HRESULT. A value of S_OK indicates success.

Remarks

The InstallPKCS7 method is similar to the ICEnroll::acceptPKCS7 method, except the input parameter to InstallPKCS7 does not contain a request certificate.

Example Code [C++]

HRESULT    hr;

// Install the PKCS7.
// bstrPKCS7 is a BSTR variable previously set to a PKCS #7.
hr = pEnroll3->InstallPKCS7(bstrPKCS7);
if (FAILED(hr))
    printf("Failed InstallPKCS7 [%x]\n", hr);
 

Example Code [Visual Basic]

' Install the PKCS7.
' strPKCS7 is a String variable previously set to a PKCS #7.
objXen.InstallPKCS7(strPKCS7)

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Xenroll.h.
  Library: Use Uuid.lib.

See Also

ICEnroll::acceptPKCS7