Transbase Version 6.7.1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Transbase Version 6.7.

Tbarc SDK

Copyright © 1987 - 2008 by:

Transaction Software GmbH


Willy-Brandt-Allee 2
D-81829 Munich
Germany
Telephone: 0 89 / 6 27 09 0
Telefax: 0 89 / 6 27 09 11
Electronic Mail: tas@transaction.de
Table of Contents

1 Concepts................................................................................................................ 3

2 Building an application ........................................................................................ 4

3 Installing your application ................................................................................... 5

4 Tbarc SDK reference guide.................................................................................. 6


Tbarc SDK,V6.7, 08/03/31

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

3 Installing your application

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

4 Tbarc SDK reference guide

In the following each API is documented in detail

Bool TbarcWrite(char* sArchive, char *sDbname, char *sArgstring, PtbarcCallback


pStdout, PtbarcCallback pStderr)
Function: Equivalent to tbarc –w sArchive sDbname sArgstring

Example: TbarcWrite(“backup”, “db”, “”, NULL, NULL

Bool TbarcRead(char* sArchive, char *sDbname, char *sArgstring, PtbarcCallback


pStdout, PtbarcCallback pStderr)
Function: Equivalent to: tbarc –r sArchive sDbname sArgstring

Example: TbarcRead(“backup”, “db”, “”, NULL, NULL);

Bool TbarcGetLastErrorCode(long* pErrorCode)


Function: Returns the error code for the last API call.

Example:
Long nCode;
If(FALSE==API(…)){
TbarcGetLastError(&nCode);
Printf(“Error: %ld\n”, nCode,);
}

Bool TbarcGetLastErrorText(char** pErrorString)


Function:
Returns a pointer to the error text for the last API call.

Example:
Char *pText;
If(FALSE==API(…)){
TbarcGetLastErrorText(&pText);
Printf(“Error: %s\n”, pText);
}

Bool TbArcCallback(char *sFormat, …)


Function: Is called for output operation.

Note: The return value is ignored.

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;
}

PTbadmCallback pTbarcCallback=(PTbarcCallback) TbArcOut;


TbarcWrite(“backup”, “db”, “”, pTbarcCallback, pTbarcCallback);

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy