Share via


ICertPolicy::Initialize 메서드(certpol.h)

Initialize 메서드는 정책 모듈이 초기화 작업을 수행할 수 있도록 서버 엔진에서 호출됩니다.

구문

HRESULT Initialize(
  [in] const BSTR strConfig
);

매개 변수

[in] strConfig

인증서 서비스를 설정하는 동안 입력한 인증 기관의 이름을 나타냅니다. 구성 문자열 이름에 대한 자세한 내용은 ICertConfig2를 참조하세요.

반환 값

VB

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

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

설명

사용자 지정 정책 모듈을 작성할 때 이 메서드를 구현합니다.

예제

#include <windows.h>
#include <Certpol.h>

STDMETHODIMP CCertPolicy::Initialize(
    /* [in] */ BSTR const strConfig)
{
    // strConfig can be used by the Policy module.
    // Here, it is stored in a BSTR member variable.
    // m_strConfig is an application-defined variable.
    // Call SysFreeString to free m_strConfig when done.
    m_strConfig = SysAllocString( strConfig );
    // Check to determine whether there was enough memory.
    if (NULL == m_strConfig)
        return ( E_OUTOFMEMORY );  // Not enough memory

    return( S_OK );
}

요구 사항

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

추가 정보

ICertConfig

ICertPolicy

ICertPolicy2