Microsoft® CryptoAPI version 2.0 supports the encoding and decoding of certificates. CryptoAPI includes an extensive, flexible system of functions and C structures that allows you to encode and decode in various ways. If, however, you want to achieve interoperability with other systems, you should use the X.509 certificate structure and ASN.1 encoding. The CryptoAPI supports both of these standards.
For an overview of data encoding and decoding, see Encoding and Decoding Data.