CERT_STORE_PROV_INFO

CERT_STORE_PROV_INFO structures contain information returned by the installed CertDllOpenStoreProv when a store is opened with CertOpenStore.

When opening a store, CertOpenStore zeroes all fields in the CERT_STORE_PROV_INFO except cbSize, which is set to the size of CERT_STORE_PROV_INFO. The structure is updated by the CertDllOpenStoreProv installable function. If there are no additional callback functions to be called, then cStoreProvFunc remains zero upon return.

typedef struct _CERT_STORE_PROV_INFO {
    DWORD               cbSize;
    DWORD               cStoreProvFunc;
    void**              rgpvStoreProvFunc;
    HCERTSTOREPROV      hStoreProv;
    DWORD               dwStoreProvFlags;
    HCRYPTOIDFUNCADDR   HStoreProvFuncAddr2;
} CERT_STORE_PROV_INFO, *PCERT_STORE_PROV_INFO;
 

Members

cbSize
Set by CertOpenStore to the size of this structure.
cStoreProvFunc
The count of callback functions that are implemented, including any NULL values that are used in indexes prior to the last callback function implemented. For example, if only one callback function is implemented, but it is at index [2] (CERT_STORE_PROV_WRITE_CERT_FUNC), with NULL for indexes [0] and [1], then the number 3 should be passed for this parameter.
rgpvStoreProvFunc
An array of pointers to the callback functions. This array is indexed by the values given in the following table, and they must be in the order shown. The associated callback function is shown as well. When the count of callback functions (cStoreProvFunc) is greater than 1, the elements of rgpvStoreProvFunc that aren't supported with a callback function should be NULL. Otherwise they should contain the address of the callback function.
Index Associated callback function
CERT_STORE_PROV_CLOSE_FUNC(0) CertStoreProvCloseCallback
CERT_STORE_PROV_READ_CERT_FUNC(1) CertStoreProvReadCertCallback
CERT_STORE_PROV_WRITE_CERT_FUNC(2) CertStoreProvWriteCertCallback
CERT_STORE_PROV_DELETE_CERT_FUNC(3) CertStoreProvDeleteCertCallback
CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC(4) CertStoreProvSetCertPropertyCallback
CERT_STORE_PROV_READ_CRL_FUNC(5) CertStoreProvReadCRLCallback
CERT_STORE_PROV_WRITE_CRL_FUNC(6) CertStoreProvWriteCRLCallback
CERT_STORE_PROV_DELETE_CRL_FUNC(7) CertStoreProvDeleteCRLCallback
CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC(8) CertStoreProvSetCRLPropertyCallback
CERT_STORE_PROV_READ_CTL_FUNC(9) CertStoreProvReadCTLCallback
CERT_STORE_PROV_WRITE_CTL_FUNC(10) CertStoreProvWriteCTLCallback
CERT_STORE_PROV_DELETE_CTL_FUNC(11) CertStoreProvDeleteCTLCallback
CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC(12) CertStoreProvSetCTLPropertyCallback
CERT_STORE_PROV_CONTROL_FUNC(13) CertStoreProvControlCallback
CERT_STORE_PROV_FIND_CERT_FUNC(14) CertStoreProvFindCertCallback
CERT_STORE_PROV_FREE_FIND_CERT_FUNC(15) CertStoreProvFreeFindCertCallback
CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC(16) CertStoreProvGetCertPropertyCallback
CERT_STORE_PROV_FIND_CRL_FUNC(17) CertStoreProvFindCRLCallback
CERT_STORE_PROV_FREE_FIND_CRL_FUNC(18) CertStoreProvFreeFindCRLCallback
CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC(19) CertStoreProvGetCRLPropertyCallback
CERT_STORE_PROV_FIND_CTL_FUNC(20) CertStoreProvFindCTLCallback
CERT_STORE_PROV_FREE_FIND_CTL_FUNC(21) CertStoreProvFreeFindCTLCallback
CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC(22) CertStoreProvGetCTLPropertyCallback

hStoreProv
This is the first parameter passed to all callbacks. Because this is a void pointer (HCERTSTOREPROV is type-defined to a void*), an application can specify the contents as desired. Typically, this may be a pointer to anything that is specific to an application's data structure, such as provider state information for each store opened.
dwStoreProvFlags
dwStoreProvFlags is set to CERT_STORE_PROV_EXTERNAL_FLAG to indicate that certificates, CRLs, and CTLs are external to the store's cache. It is set to CERT_STORE_PROV_DELETED_FLAG if the store was successfully deleted. Otherwise it is set to 0.