SPCFileName Property

ICEnroll4::SPCFileName property

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

The SPCFileName property sets or retrieves the name of the file to which to write the base64-encoded PKCS #7 (in BSTR form) as returned from the certification authority.

This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax


HRESULT put_SPCFileName(
  [in]  BSTR FileName
);

HRESULT get_SPCFileName(
  [out] BSTR *pFileName
);

Property value

A string that contains the name of the file to which to write the base64-encoded PKCS #7 as returned from the certification authority. The string can be any valid file name supported by the operating system.

Error codes

If the property access methods put_SPCFileName and get_SPCFileName succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

Remarks

The file is written as a binary PKCS #7. Specifying this file does not affect the acceptance of the certificates into any of the user's stores.

If the file already exists, the user is notified and prompted for permission to overwrite it.

SPCFileName affects the behavior of the following methods:

Examples


BSTR     bstrSPCFile = NULL;
BSTR     bstrNewSPCFile = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the SPCFileName
hr = pEnroll->get_SPCFileName( &bstrSPCFile );
if (FAILED( hr ))
    printf("Failed get_SPCFileName - %x\n", hr );
else
    printf( "SPCFileName: %ws\n", bstrSPCFile );
// free BSTR when done
if ( NULL != bstrSPCFile )
    SysFreeString( bstrSPCFile );

// set the SPCFileName, for example, "MyFile.SPC".
bstrNewSPCFile = SysAllocString(TEXT("<FILENAMEHERE>"));

hr = pEnroll->put_SPCFileName( bstrNewSPCFile );
if (FAILED( hr ))
    printf("Failed put_SPCFileName - %x\n", hr );
else
    printf( "SPCFileName set to %ws\n", bstrNewSPCFile );
// free BSTR when done
if ( NULL != bstrNewSPCFile )
    SysFreeString( bstrNewSPCFile );

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

 

 

Show:
© 2016 Microsoft