Share via


ICertServerPolicy::EnumerateAttributesSetup 메서드(certif.h)

EnumerateAttributesSetup 메서드는 현재 컨텍스트와 연결된 첫 번째 요청 특성에 대한 내부 열거형 포인터를 초기화합니다.

구문

HRESULT EnumerateAttributesSetup(
  [in] LONG Flags
);

매개 변수

[in] Flags

이 매개 변수는 예약되어 있으며 0으로 설정해야 합니다.

반환 값

VB

메서드가 성공하면 메서드는 S_OK 반환합니다.

메서드가 실패하면 오류를 나타내는 HRESULT 값을 반환합니다. 일반적인 오류 코드 목록은 일반 HRESULT 값을 참조하세요.

설명

이 메서드를 호출하기 전에 SetContext 메서드를 호출해야 합니다. SetContext에 대한 호출은 현재 컨텍스트로 사용할 요청을 지정합니다.

특성을 검색하려면 EnumerateAttributes 메서드를 호출합니다 . EnumerateAttributes 호출은 첫 번째 특성을 검색하고 인덱스가 있는 경우 다음 특성으로 이동합니다.

예제

// 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;
}

요구 사항

요구 사항
지원되는 최소 클라이언트 지원되는 버전 없음
지원되는 최소 서버 Windows Server 2003 [데스크톱 앱만 해당]
대상 플랫폼 Windows
헤더 certif.h(Certsrv.h 포함)
라이브러리 Certidl.lib
DLL Certcli.dll

추가 정보

ICertServerPolicy

ICertServerPolicy::EnumerateAttributes

ICertServerPolicy::EnumerateAttributesClose

ICertServerPolicy::SetContext