dbxCommon.h

I developed this code on a windows system. It may be correct on other systems, but you have to check it yourself. To make sure of this, I inserted the following lines. ( AS_WIN32 is not used outside of this file.)

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
#define AS_WIN32
#else
#error "This code is made for windows."
#endif

If you want to create a windows dll file of this oedbx library or if you want to use the dll file in your project, AS_OEDBX_DLL has to be defined.
In any other case comment out the following line

#define AS_OEDBX_DLL

Dependant on the choice you made above AS_EXPORT is defined.
At the beginning of each cpp library file AS_OE_IMPLEMENTATION is defined to differentiate between the creation and the usage of a windows dll.

#if defined(AS_WIN32) && defined(AS_OEDBX_DLL)
#if defined(AS_OE_IMPLEMENTATION)
#define AS_EXPORT __declspec(dllexport)
#else
#define AS_EXPORT __declspec(dllimport)
#endif
#else
#define AS_EXPORT
#endif

If you compile this library make sure thar intx is a unsigned x bytes integer value.

typedef unsigned char int1;
typedef unsigned short int2;
typedef unsigned long int4;

The input and output streams of the library.

typedef std::istream & InStream;
typedef std::ostream & OutStream;

This exception is thrown, when an error occurs in the oedbx library.

class AS_EXPORT DbxException
{ public : DbxException(const std::string text) { Error = text; }
const char * what() const { return Error.c_str(); }
private : std::string Error;
};

The following functions are only used for ShowResults()
FileTime2String : Converts a windows FILETIME structure to a string.
rows2File : Makes a hexdump from 'length' values starting at address 'values'. 'address' is only used to label the rows.

std::string AS_EXPORT FileTime2String(int1 * str);
OutStream AS_EXPORT rows2File(OutStream out,int4 address, int1 * values, int4 length);

Home of OE dbx file format