다음을 통해 공유


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

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

구문

HRESULT EnumerateExtensionsSetup(
  [in] LONG Flags
);

매개 변수

[in] Flags

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

반환 값

VB

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

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

설명

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

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

예제

// 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->EnumerateExtensionsSetup( 0 );
if (FAILED(hr))
{
    printf("Failed EnumerateExtensionsSetup [%x]\n", hr);
    goto error;
}

요구 사항

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

추가 정보

EnumerateExtensions

ICertServerPolicy

Setcontext