CertModifyCertificatesToTrust function (cryptdlg.h)

The CertModifyCertificatesToTrust function modifies the set of certificates in a certificate trust list (CTL) for a given purpose.

Note  This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to CryptDlg.dll.
 

Syntax

CRYPTDLGAPI HRESULT CertModifyCertificatesToTrust(
  [in]           int                 cCerts,
  [in]           PCTL_MODIFY_REQUEST rgCerts,
  [in]           LPCSTR              szPurpose,
  [in]           HWND                hwnd,
  [in, optional] HCERTSTORE          hcertstoreTrust,
  [in, optional] PCCERT_CONTEXT      pccertSigner
);

Parameters

[in] cCerts

The number of modification requests that are in the rgCerts parameter.

[in] rgCerts

A pointer to a CTL_MODIFY_REQUEST structure that contains an array of modification requests.

[in] szPurpose

A pointer to a null-terminated string that contains the string representation of an object identifier (OID). The OID specifies the enhanced key usage (EKU) of the CTL to be modified.

[in] hwnd

A handle to the parent window of the dialog boxes that this function generates.

[in, optional] hcertstoreTrust

A handle to the certificate store in which to modify the list of trusted certificates. If NULL, the Trusted People store is used with the Current User location.

[in, optional] pccertSigner

A pointer to a CERT_CONTEXT structure that contains a certificate. It is used to sign the trust list. The certificate also restricts the set of trust lists that may be modified. If NULL, the trust list is not signed.

Return value

An HRESULT. A value of S_OK indicates success.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header cryptdlg.h
DLL CryptDlg.dll

See also

CTL_MODIFY_REQUEST