ICertPolicy::ShutDown 方法 (certpol.h)

在服务器终止之前,服务器引擎会调用 ShutDown 方法。

调用 ShutDown 时,策略模块应清理并停止。 可以保证在调用 ShutDown 后不会收到任何请求。

语法

HRESULT ShutDown();

返回值

VB

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

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

注解

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

示例

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

STDMETHODIMP CCertPolicy::ShutDown()
{
    // Clean up resources used by this process.

    // Display message that this method has been called.
    if ( fDebug )
    {
        printf("Policy module Shutdown was called\n");
    }
    return( S_OK );
}

要求

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

另请参阅

ICertPolicy

ICertPolicy2