Export Method

ICertificate2::Export method

[CAPICOM is a 32-bit only component that is available for use in the following operating systems: Windows Server 2008, Windows Vista, and Windows XP. Instead, use the X509Certificate2 Class in the System.Security.Cryptography.X509Certificates namespace.]

The Export method copies a certificate to an encoded string. The encoded string can be written to a file or imported into a new Certificate object.

Syntax


Certificate.Export( _
  [ ByVal EncodingType ] _
)

Parameters

EncodingType [in, optional]

A value of the CAPICOM_ENCODING_TYPE enumeration that specifies the encoding type for the export operation. The default value is CAPICOM_ENCODE_BASE64. The following table shows the possible values.

ValueMeaning
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

A string that contains the exported certificate in the specified encoding form.

Requirements

End of client support

Windows Vista

End of server support

Windows Server 2008

Redistributable

CAPICOM 2.0 or later on Windows Server 2003 and Windows XP

DLL

Capicom.dll

See also

Cryptography Objects
Certificate

 

 

Show:
© 2016 Microsoft