CertSrvBackupClose 関数 (certbcli.h)

CertSrvBackupClose 関数は、CertSrvBackupOpenFile 関数によって開かれたファイルを閉じます。

構文

HRESULT CERTBCLI_API CertSrvBackupClose(
  [in] HCSBC hbc
);

パラメーター

[in] hbc

Certificate Services バックアップ コンテキストへのハンドル。

戻り値

戻り値は HRESULT です。 値 S_OK は成功を示します。

注釈

CertSrvBackupOpenFile を正常に呼び出すたびに、CertSrvBackupClose の後続の呼び出しが行われる必要があります。 ファイルのバックアップが完了したら、ファイルを閉じる必要があります。

FNCERTSRVBACKUPCLOSE* pfnClose;
char * szBackupCloseFunc = "CertSrvBackupClose";
HRESULT    hr=0;

// Get the address for the desired function.    
// hInst was set by calling LoadLibrary for Certadm.dll.
pfnClose = (FNCERTSRVBACKUPCLOSE*)GetProcAddress(hInst,
                                   szBackupCloseFunc);
if ( NULL == pfnClose )
{
    printf("Failed GetProcAddress - %s, error=%d\n",
            szBackupCloseFunc,
            GetLastError() );
    exit(1);  // Or other appropriate error action.
}
// Close the file.
// hCSBC represents an HCSBC used in
// an earlier call to CertSrvBackupOpenFile.
hr = pfnClose(hCSBC);
if (FAILED(hr))
{
    printf("Failed pfnClose call [%x]\n", hr);
    exit(1);  // Or other appropriate error action.
}

要件

要件
サポートされている最小のクライアント サポートなし
サポートされている最小のサーバー Windows Server 2003 (デスクトップ アプリのみ)
対象プラットフォーム Windows
ヘッダー certbcli.h (Certsrv.h を含む)
Library Certadm.lib
[DLL] Certadm.dll

こちらもご覧ください

CertSrvBackupOpenFile

CertSrvBackupRead

証明書サービスのバックアップと復元の機能の使用