Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The CertSrvBackupClose function closes the file opened by the CertSrvBackupOpenFile function.
Syntax
HRESULT CERTBCLI_API CertSrvBackupClose(
[in] HCSBC hbc
);
Parameters
[in] hbc
A handle to a Certificate Services backup context.
Return value
The return value is an HRESULT. A value of S_OK indicates success.
Remarks
For every successful call to CertSrvBackupOpenFile, there should be a subsequent call to CertSrvBackupClose. Upon completion of backing up a file, the file needs to be closed.
Examples
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.
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | certbcli.h (include Certsrv.h) |
Library | Certadm.lib |
DLL | Certadm.dll |