User's Guide > Programmer’s Reference
Programmer’s Reference
These topics provide technical reference information for developers using the application programming interface (API) included with Backup Agent. The information here is not designed to provide high-level conceptual or how-to information.
The following functions are included:
PvBackupSetOn()
Description
Turns on Backup Agent
Include
pvbackupapi.h
Library
pvbackupapi.lib (Windows 32-bit)
w64pvbackupapi.lib (Windows 64-bit)
libpvbackupapi.so (Linux)
Syntax
BU_STAT PvBackupSetOn();
Return Value
 
BU_ON
Backup Agent is successfully turned on (or was already on when this function was called).
BU_ERROR
Backup Agent cannot be turned on because of an error. Use PvBackupGetLogDir() to locate log files containing specific error information.
BU_BUSY
Backup Agent cannot be turned on because the system is busy due to a cleanup or startup operation in progress. Try again in a few seconds.
BU_ON_WITHERROR
Backup Agent is turned on, but some errors have occurred since it was turned on.
BU_INSTALL_ERROR
Incompatible MicroKernel or incomplete Backup Agent installation was detected. Backup Agent event handler may not be installed and registered correctly. Please reinstall Backup Agent software.
PvBackupSetOff()
Description
Turns off Backup Agent
Include
pvbackupapi.h
Library
pvbackupapi.lib (Windows 32-bit)
w64pvbackupapi.lib (Windows 64-bit)
libpvbackupapi.so (Linux)
Syntax
BU_STAT PvBackupSetOff();
Return Value
 
BU_OFF
Backup Agent is successfully turned off (or was already off when this function was called).
BU_ERROR
Backup Agent cannot be turned off because of an error. Use PvBackupGetLogDir() to locate log files containing specific error information. This value will not be returned if an error occurred BEFORE this function was called; use PvBackupGetStatus() to get that information.
BU_BUSY
Backup Agent cannot be turned off because the system is busy due to a cleanup or startup operation in progress. Try again in a few seconds.
BU_INSTALL_ERROR
Incompatible MicroKernel or incomplete Backup Agent installation was detected. Backup Agent event handler may not be installed and registered correctly. Please reinstall Backup Agent software.
PvBackupGetStatus()
Description
Retrieves current status of Backup Agent
Include
pvbackupapi.h
Library
pvbackupapi.lib (Windows 32-bit)
w64pvbackupapi.lib (Windows 64-bit)
libpvbackupapi.so (Linux)
Syntax
BU_STAT PvBackupGetStatus();
Return Value
 
BU_ON
Backup Agent is turned on and no errors have occurred.
BU_OFF
Backup Agent is turned off.
BU_ERROR
Backup Agent cannot get the status because of an error. Use PvBackupGetLogDir() to locate log files containing specific error information.
BU_ON_WITHERROR
Backup Agent is turned on, but some errors have occurred since it was turned on.
BU_BUSY
Backup Agent cannot process the get status request because the system is busy due to a cleanup or startup operation in progress. Try again in a few seconds.
BU_INSTALL_ERROR
Incompatible MicroKernel or incomplete Backup Agent installation was detected. Backup Agent event handler may not be installed and registered correctly. Please reinstall Backup Agent software.
PvBackupGetLogDir()
Description
Obtains the directory where Backup Agent log files are written
Include
pvbackupapi.h
Library
pvbackupapi.lib (Windows 32-bit)
w64pvbackupapi.lib (Windows 64-bit)
libpvbackupapi.so (Linux)
Syntax
const char* const PvBackupGetLogDir();
Return Value
 
char*
A pointer to a static buffer containing the ANSI string in the system default character encoding. Returns NULL on failure, or if LogsPath registry key is deleted or empty.
The string is usable as ASCII on an English-only system.
Remarks
This is the single-byte character set.
See Also
PvBackupGetLogDirW()
Description
Obtains the directory where Backup Agent log files are written
Include
pvbackupapi.h
Library
pvbackupapi.lib (Windows 32-bit)
w64pvbackupapi.lib (Windows 64-bit)
libpvbackupapi.so (Linux)
Syntax
const wchar_t* const PvBackupGetLogDirW();
Return Value
 
wchar_t*
A pointer to a static buffer containing the wide-character string. Returns NULL on failure, or if LogsPath registry key is deleted or empty.
Remarks
This is the double-byte character set.
See Also
 
Last modified date: 12/01/2023