Share via


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

GetDescription 메서드는 정책 모듈 및 해당 함수에 대해 사람이 읽을 수 있는 설명을 반환합니다.

구문

HRESULT GetDescription(
  [out] BSTR *pstrDescription
);

매개 변수

[out] pstrDescription

정책 모듈을 설명하는 BSTR 에 대한 포인터입니다.

반환 값

C++

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

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

VB

정책 모듈 및 해당 함수를 설명하는 문자열을 반환합니다.

설명

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

예제

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

STDMETHODIMP CCertPolicy::GetDescription(
    /* [out, retval] */ BSTR __RPC_FAR *pstrDescription)
{
    if (NULL == pstrDescription)
    {
        // Bad pointer address
        return ( E_POINTER );
    }
    if (NULL != *pstrDescription)
    {
        SysFreeString(*pstrDescription);
        *pstrDescription=NULL;
    }
    // wszMyModuleDesc defined elsewhere, for example:
    // #define wszMyModuleDesc L"My Policy Module"
    *pstrDescription = SysAllocString(wszMyModuleDesc);
    if (NULL == *pstrDescription)
    {
        // Not enough memory
        return ( E_OUTOFMEMORY );
    }
    // Success
    return( S_OK );
}

요구 사항

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

추가 정보

ICertPolicy

ICertPolicy2