CertDeleteCertificateFromStore
This function deletes the specified certificate context from the certificate store.
BOOL WINAPI CertDeleteCertificateFromStore(
PCCERT_CONTEXT pCertContext
);
Parameters
- pCertContext
[in] Pointer to the CERT_CONTEXT structure to be deleted.
Return Values
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
For extended error information, call the GetLastError function. The following table lists one possible error code.
| Value | Description |
|---|---|
| E_ACCESSDENIED | Indicates the store was opened as read-only and a delete operation is not allowed. |
Remarks
After a certificate is deleted from a store, all subsequent attempts to get or find that certificate in that store will fail. However, memory allocated for the certificate is not freed until all duplicated contexts have also been freed.
The pCertContext parameter is always freed for this function by using the CertFreeCertificateContext, even for an error. Freeing the context reduces its reference count by one. If the reference count reaches zero, memory allocated for the certificate is freed.
Requirements
| Runs on | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 3.0 or later | Wincrypt.h | Crypt32.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
CertFreeCertificateContext, CERT_CONTEXT
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.