Historical Content Alert
This is a historical content for Windows NT 4.0 product and is presented for informative purposes only. All content in this directory is copyrighted and owned by Microsoft.

ICertEncodeSampleStructure2 Interface

The ICertEncodeSampleStructure2 interface provides methods that demonstrate how to handle a custom structure to be used in certificate extensions. A certificate extension can be created using a custom structure stored in an extension handler COM object instantiated by the policy module.

The interface methods are designed to handle the CERT_SAMPLE_STRUCTURE2_INFO sample data structure. This data structure is defined as follows:

DWORD dwVersion;
LONG lField1;
WCHAR * pwszField2;
FILETIME dateField3;

The following methods are provided by the ICertEncodeSampleStructure2 interface.

Method Description
Decode Decodes an ASN encoded CERT_SAMPLE_STRUCTURE2_INFO structure and stores the resulting structure in the COM object.
Encode Performs ASN encoding on a CERT_SAMPLE_STRUCTURE2_INFO structure stored in the COM object and returns the ASN encoded structure.
GetDateField3 Returns the date value contained in the dateField3 field of the CERT_SAMPLE_STRUCTURE2_INFO structure.
GetLongField1 Returns the long value contained in the lField1 field of the CERT_SAMPLE_STRUCTURE2_INFO structure.
GetStringField2 Returns the string value contained in the pwszField2 field of the CERT_SAMPLE_STRUCTURE2_INFO structure.


Share this article: