CertSerializeCTLStoreElement

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

#include <wincrypt.h>
BOOL WINAPI CertSerializeCTLStoreElement(
  PCCTL_CONTEXT pCtlContext,     // in
  DWORD dwFlags,                 // in
  BYTE *pbElement,               // out
  DWORD *pcbElement              // in, out
);
 

Parameters

pCtlContext
Pointer to the CTL 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 CTL, 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 that is pointed to by 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.

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