ICEnroll::acceptFilePKCS7 method (xenroll.h)

[This method is no longer available for use as of Windows Server 2008 and Windows Vista.]

The acceptFilePKCS7 method accepts and processes a file that contains a PKCS #7 message containing a certificate. This method was first defined in the ICEnroll interface.

Syntax

HRESULT acceptFilePKCS7(
  [in] BSTR wszPKCS7FileName
);

Parameters

[in] wszPKCS7FileName

Specifies the name of the file that contains the PKCS #7 message.

Return value

VB

The return value is an HRESULT. A value of S_OK indicates success. Upon successful completion of this function, the PKCS #7 message in the file will be accepted.

Remarks

By default, the My, Ca, Root, and Request system stores are used to store the certificates. However, you can specify other stores by assigning the following properties before calling this method:

The acceptFilePKCS7 method differs from acceptPKCS7 only in that a file supplies the certificate.

Examples

HRESULT  hr;
BSTR     bstrFileName;

// Allocate a BSTR referencing an existing file, 
// for example, "myPKCS7.fil".
bstrFileName = SysAllocString(TEXT("<FILENAMEHERE>"));
if (NULL == bstrFileName)
{
    //handle error
}

// pEnroll is a previously instantiated ICEnroll interface pointer.
hr = pEnroll->acceptFilePKCS7( bstrFileName );
if (FAILED(hr))
    printf("Failed acceptFilePKCS7 - %x\n", hr );
else
	printf("Accepted PKCS #7 from file %ws successfully\n", 
	bstrFileName );

// Free BSTR when done.
if (bstrFileName)
    SysFreeString(bstrFileName);

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header xenroll.h
Library Uuid.lib
DLL Xenroll.dll

See also

CAStoreName

CEnroll

ICEnroll

ICEnroll2

ICEnroll3

ICEnroll4

MyStoreName

RequestStoreName

RootStoreName

acceptPKCS7