IX509CertificateRequestCertificate::put_SerialNumber method (certenroll.h)

The SerialNumber property specifies and retrieves the certificate serial number. The serial number is contained in a byte array encoded by using Distinguished Encoding Rules (DER) as defined by the Abstract Syntax Notation One (ASN.1) standard. The DER-encoded byte array is represented by a string that is either a pure binary sequence or is Unicode encoded.

This property is read/write.

Syntax

HRESULT put_SerialNumber(
  EncodingType Encoding,
  BSTR         Value
);

Parameters

Encoding

Value

Return value

None

Remarks

After calling Encode, the default value is a GUID with a high-order nibble that is not zero (to ensure that the hexadecimal representation of the serial number has an even number of digits). The high-order nibble is in the range 1 to 7. You must initialize the request object before calling this property. For more information, see any of the following methods:

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See also

IX509CertificateRequestCertificate