Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0
- Introduction to NetBackup XBSA
 - How to set up the SDK
 - Using the NetBackup XBSA interface
- Getting help with the API
 - NetBackup XBSA data structures
 - NetBackup XBSA environment
 - XBSA sessions and transactions
 - Creating a NetBackup XBSA application
 
 - How to build an XBSA application
 - How to run a NetBackup XBSA application
 - API reference
- Error messages
 - Function calls
 - Function specifications
- BSABeginTxn
 - BSACreateObject
 - BSADeleteObject
 - BSAEndData
 - BSAEndTxn
 - BSAGetData
 - BSAGetEnvironment
 - BSAGetLastError
 - BSAGetNextQueryObject
 - BSAGetObject
 - BSAInit
 - BSAQueryApiVersion
 - BSAQueryObject
 - BSAQueryServiceProvider
 - BSASendData
 - BSATerminate
 - NBBSAAddToMultiObjectRestoreList
 - NBBSADeleteImage
 - NBBSAEndGetMultipleObjects
 - NBBSAFreeJobInfo
 - NBBSAGetEnv
 - NBBSAGetErrorString
 - NBBSAGetJobId
 - NBBSAGetJobInfo
 - NBBSAGetMediaIds
 - NBBSAGetMultipleObjects
 - NBBSAGetServerError
 - NBBSALogMsg
 - NBBSASetEnv
 - NBBSAUpdateEnv
 - NBBSAValidateFeatureId
 
 - Type definitions
 
 - Process flow and troubleshooting
 - How to use the sample files
 - Support and updates
 - Appendix A. Register authorized locations
 
BSAGetLastError
Return the last system error code.
SYNOPSIS
#include <xbsa.h>
int BSAGetLastError(BSA_UInt32 *sizePtr, char *errorCodePtr)
DESCRIPTION
The BSAGetLastError() call returns a textual description of the last error encountered by the NetBackup XBSA interface. It is used to return the NetBackup-specific information that describes the underlying cause of the failure of the most recent XBSA call; for example, a network failure.
PARAMETERS
BSA_UInt32 sizePtr (I/O)  | This parameter contains the size of the error buffer in bytes.  | 
char *errorPtr (O)  | This parameter is a pointer to a data area that contains a text string describing the last error encountered.  | 
EXTENDED DESCRIPTION
If the NetBackup XBSA interface sets the sizePtr parameter to zero, it is unable to return a string describing the last error. This indicates that the NetBackup XBSA interface has no record of what error occurred.
If a BSA_RC_BUFFER_TOO_SMALL error is encountered, the required size is returned in the sizePtr parameter. If the XBSA application sets the sizePtr parameter to zero, this forces a BSA_RC_BUFFER_TOO_SMALL error that provides a mechanism to query the required size.
RETURN VALUE
The following return codes are returned by this function:
BSA_RC_BUFFER_TOO_SMALL  | The size of the data buffer is invalid.  | 
BSA_RC_INVALID_CALL_SEQUENCE  | The sequence of API calls is incorrect.  | 
BSA_RC_INVALID_HANDLE  | The handle used to associate this call with a previous BSAInit() call is invalid.  | 
BSA_RC_NULL_ARGUMENT  | A NULL pointer was encountered in one of the arguments.  | 
BSA_RC_SUCCESS  | The function succeeded.  |