Transbase Version 6.7.1
Transbase Version 6.7.1
Transbase Version 6.7.1
Tbarc SDK
1 Concepts................................................................................................................ 3
1 Concepts
The tbarc sdk is designed very closely to the tbarc archiving tool. For each tbarcs’s main
function there is an appropriate API which serves for that functionality.
Each API has to be called with the target- or sourcedirectory, a databasename and an ASCII
parameterstring. A callback for standardio and a callback for erroroutput can be supplied.
Optional parameters may be given by an argumentstring.
For each API needing a sParamString parameter specfiying a NULL pointer is equivalent to
specifying an empty string and means no additional parameters given.
Each API returns boolean TRUE in case of success, and FALSE otherwise. In case of no
success an appropriate error code and error message can be retrieved.
The Tbarc SDK comes together with the Transbase Server package. For using your own tbarc
application a Transbase Server license is required.
Tbarc SDK,V6.7, 08/03/31
2 Building an application
For compiling your application you must include tbadmsdk.h within your sourcecode.
Building the application must be done by linking against tbarcd32.lib.
Tbarc SDK,V6.7, 08/03/31
At runtime tbarcd32.dll is needed. This DLL is an add on for a standard Transbase Server
installation. This implies that other DLL’s like tbker32.dll and a Transbase Server license are
required too.
Tbarc SDK,V6.7, 08/03/31
Example:
Long nCode;
If(FALSE==API(…)){
TbarcGetLastError(&nCode);
Printf(“Error: %ld\n”, nCode,);
}
Example:
Char *pText;
If(FALSE==API(…)){
TbarcGetLastErrorText(&pText);
Printf(“Error: %s\n”, pText);
}
Example:
Bool TbArcOut(char *sFormat, …)
{
va_list vam;
va_start(vam, f);
vfprintf(stderr,f, vam);
Tbarc SDK,V6.7, 08/03/31
fflush(stderr);
va_end(vam);
return TRUE;
}