ICertExit2::GetDescription method

The GetDescription method returns a human-readable description of the exit module and its function. This method was first defined in the ICertExit interface.

Syntax


HRESULT GetDescription(
  [out] BSTR *pstrDescription
);

Parameters

pstrDescription [out]

A pointer to the BSTR that describes the exit module.

Return value

C++

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

Returns a string that describes the exit module and its function.

Remarks

When you write a custom exit module, implement this method.

Examples


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

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certexit.h (include Certsrv.h)

IID

IID_ICertExit2 is defined as 0abf484b-d049-464d-a7ed-552e7529b0ff

See also

ICertExit
ICertExit2

 

 

Show: