ICertExit::GetDescription 方法 (certexit.h)

GetDescription 方法返回退出模块及其函数的可读说明。 此方法首先在 ICertExit 接口中定义。

语法

HRESULT GetDescription(
  [out] BSTR *pstrDescription
);

参数

[out] pstrDescription

指向描述退出模块的 BSTR 的指针。

返回值

C++

如果方法成功,该方法将返回S_OK。

如果方法失败,它将返回一个 指示错误的 HRESULT 值。 有关常见错误代码的列表,请参阅 通用 HRESULT 值

VB

返回描述退出模块及其函数的字符串。

备注

编写自定义退出模块时,请实现此方法。

示例

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

要求

   
最低受支持的客户端 无受支持的版本
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
目标平台 Windows
标头 certexit.h (包括 Certsrv.h)

另请参阅

ICertExit

ICertExit2