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 포함)
라이브러리 Certadm.lib
DLL Certadm.dll

추가 정보

CertSrvBackupOpenFile

CertSrvBackupRead

인증서 서비스 백업 및 복원 함수 사용