Metodo ICertServerPolicy::EnumerateAttributesSetup (certif.h)

Il metodo EnumerateAttributesSetup inizializza il puntatore di enumerazione interno al primo attributo della richiesta associato al contesto corrente.

Sintassi

HRESULT EnumerateAttributesSetup(
  [in] LONG Flags
);

Parametri

[in] Flags

Questo parametro è riservato e deve essere impostato su zero.

Valore restituito

VB

Se il metodo ha esito positivo, il metodo restituisce S_OK.

Se il metodo ha esito negativo, restituisce un valore HRESULT che indica l'errore. Per un elenco dei codici di errore comuni, vedere Valori HRESULT comuni.

Commenti

Il metodo SetContext deve essere chiamato prima di chiamare questo metodo. La chiamata a SetContext specifica la richiesta da utilizzare come contesto corrente.

Per recuperare l'attributo, chiamare il metodo EnumerateAttributes . La chiamata a EnumerateAttributes recupera il primo attributo e sposta l'indice sull'attributo successivo, se presente.

Esempio

// Set the context. The value nContext (long) would be the same
// as the context parameter in ICertPolicy::VerifyRequest.
// hr is defined as an HRESULT.
// pCertServerPolicy has been used to call SetContext previously.
hr = pCertServerPolicy->SetContext(nContext);
if (FAILED(hr))
{
    printf("Failed SetContext [%x]\n", hr);
    goto error;
}

// Setup the enumeration.
hr = pCertServerPolicy->EnumerateAttributesSetup(0);
if (FAILED(hr))
{
    printf("Failed EnumerateAttributesSetup [%x]\n", hr);
    goto error;
}

Requisiti

Requisito Valore
Client minimo supportato Nessuno supportato
Server minimo supportato Windows Server 2003 [solo app desktop]
Piattaforma di destinazione Windows
Intestazione certif.h (include Certsrv.h)
Libreria Certidl.lib
DLL Certcli.dll

Vedi anche

ICertServerPolicy

ICertServerPolicy::EnumerateAttributes

ICertServerPolicy::EnumerateAttributesClose

ICertServerPolicy::SetContext