Store.Export method

[The Export method is available for use in the operating systems specified in the Requirements section. Instead, use the X509Store Class in the System.Security.Cryptography.X509Certificates namespace.]

The Export method copies the contents of an open certificate store to an encoded string.

Syntax

Store.Export( _
  [ ByVal SaveAs ], _
  [ ByVal EncodingType ] _
)

Parameters

SaveAs [in, optional]

A value of the CAPICOM_STORE_SAVE_AS_TYPE enumeration that indicates the format for the export operation. The default value is CAPICOM_STORE_SAVE_AS_SERIALIZED. This parameter can be one of the following values.

Value Meaning
CAPICOM_STORE_SAVE_AS_SERIALIZED
The store is saved in serialized format.
CAPICOM_STORE_SAVE_AS_PKCS7
The store is saved in PKCS #7 format.

 

EncodingType [in, optional]

A value of the CAPICOM_ENCODING_TYPE enumeration that indicates the encoding type of the exported store. The default value is CAPICOM_ENCODE_BASE64. This parameter can be one of the following values.

Value Meaning
CAPICOM_ENCODE_ANY
This encoding type is used only when the input data has an unknown encoding type. If this value is used to specify the output's encoding type, CAPICOM_ENCODE_BASE64 will be used instead. Introduced in CAPICOM 2.0.
CAPICOM_ENCODE_BASE64
Data is saved as a base64-encoded string.
CAPICOM_ENCODE_BINARY
Data is saved as a pure binary sequence.

 

Return value

This method returns a string that contains the certificates in the store in the specified encoding form.

Requirements

Redistributable
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP
DLL
Capicom.dll

See also

Store

Cryptography Objects