ICEnroll4::acceptFilePKCS7 method

[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

wszPKCS7FileName [in]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Xenroll.h

Library

Uuid.lib

DLL

Xenroll.dll

IID

IID_ICEnroll4 is defined as c1f1188a-2eb5-4a80-841b-7e729a356d90

See also

ICEnroll4
ICEnroll3
ICEnroll2
ICEnroll
CEnroll
acceptPKCS7
CAStoreName
MyStoreName
RequestStoreName
RootStoreName

 

 

Community Additions

ADD
Show:
© 2014 Microsoft