CertSerializeCRLStoreElement

The CertSerializeCRLStoreElement function serializes a CRL context's encoded CRL and an encoded representation of its properties. The result may be persisted to storage so that the CRL and properties may be retrieved at a later time.

#include <wincrypt.h>
BOOL WINAPI CertSerializeCRLStoreElement(
  PCCRL_CONTEXT pCrlContext,     // in
  DWORD dwFlags,                 // in
  BYTE *pbElement,               // out
  DWORD *pcbElement              // in, out
);
 

Parameters

pCrlContext
Pointer to the CRL context being serialized.
dwFlags
This parameter is not currently used and should be set to zero.
pbElement
Pointer to a buffer that receives the serialized output, including the encoded CRL, and possibly its properties.

This parameter can be NULL to set the size of this information for memory allocation purposes. For more information, see Common In/Out Parameter Conventions.

pcbElement
Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the pbElement parameter. When the function returns, the variable pointed to by the pcbElement parameter contains the number of bytes stored in the buffer. This parameter can be NULL, only if pbElement is NULL.

Note  When processing the data returned in the buffer, applications need to use the actual size of the data returned. The actual size may be slightly smaller than the size of the buffer specified on input. (On input, buffer sizes are usually specified large enough to ensure that the largest possible output data will fit in the buffer.) On output, the variable pointed to by this parameter is updated to reflect the actual size of the data copied to the buffer.

Return Values

TRUE if the function succeeded. FALSE if the function failed.

Call GetLastError to see the reason for any failures.

Example

See example code with CertSerializeCertificateStoreElement.

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later. Available also in IE 3.02 and later.
  Windows: Requires Windows 95 OSR2 or later.
  Windows CE: Unsupported.
  Header: Declared in wincrypt.h.
  Import Library: Use crypt32.lib.

See Also

CertAddSerializedElementToStore