The CertDeleteCTLFromStore function deletes the specified CTL context from the certificate store.
#include <wincrypt.h>
BOOL WINAPI CertDeleteCTLFromStore(
PCCTL_CONTEXT pCtlContext // in
);
TRUE if the function succeeded. FALSE if the function failed.
Call GetLastError to see the reason for any failures. This function has the following error codes:
Error code | Description |
---|---|
E_ACCESSDENIED | Indicates the store was opened read-only and a delete operation is not allowed. |
All subsequent gets or finds for the CTL will fail. However, memory allocated for the CTL isn't freed until all duplicated contexts have also been freed.
The pCtlContext is always freed by this function via CertFreeCTLContext, even for an error.
See CertDeleteCertificateFromStore. In that example, change all references to "certificate" to "CTL."
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.