EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

CertSrvBackupClose function

The CertSrvBackupClose function closes the file opened by the CertSrvBackupOpenFile function.

Syntax


HRESULT CertSrvBackupClose(
  _In_  HCSBC hbc
);

Parameters

hbc [in]

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certbcli.h (include Certsrv.h)

Library

Certadm.lib

DLL

Certadm.dll

See also

CertSrvBackupOpenFile
CertSrvBackupRead
Using the Certificate Services Backup and Restore Functions

 

 

Contribuições da comunidade

ADICIONAR
Mostrar:
© 2014 Microsoft