// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rvdlcommon.pas' rev: 10.00

#ifndef RvdlcommonHPP
#define RvdlcommonHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Rvdlcommon
{
//-- type declarations -------------------------------------------------------
typedef int TConnectionHandle;

typedef int TResultSetHandle;

struct TDLInformation;
typedef TDLInformation *PDLInformation;

#pragma pack(push,1)
struct TDLInformation
{
	
public:
	int Resultcode;
	bool Installed;
	Word VerMajor;
	Word VerMinor;
	char InternalName[33];
	char DisplayName[256];
} ;
#pragma pack(pop)

struct TDLConnectionConfigure;
typedef TDLConnectionConfigure *PDLConnectionConfigure;

#pragma pack(push,1)
struct TDLConnectionConfigure
{
	
public:
	int ResultCode;
	char *DataSource;
	char *Options;
	char *UserName;
	char *PassWord;
} ;
#pragma pack(pop)

struct TDLConnectionOpen;
typedef TDLConnectionOpen *PDLConnectionOpen;

#pragma pack(push,1)
struct TDLConnectionOpen
{
	
public:
	int Resultcode;
	char *DataSource;
	char *Options;
	char *UserName;
	char *Password;
	int ConnectionHandle;
} ;
#pragma pack(pop)

struct TDLConnectionClose;
typedef TDLConnectionClose *PDLConnectionClose;

#pragma pack(push,1)
struct TDLConnectionClose
{
	
public:
	int ResultCode;
	int ConnectionHandle;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct TDLTableItem
{
	
public:
	char *Name;
} ;
#pragma pack(pop)

typedef TDLTableItem TDLTableList[10000];

typedef TDLTableList *PDLTableList;

struct TDLTables;
typedef TDLTables *PDLTables;

#pragma pack(push,1)
struct TDLTables
{
	
public:
	int ResultCode;
	int ConnectionHandle;
	int TableCount;
	TDLTableList *TableList;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct TDLFieldItem
{
	
public:
	char *FieldName;
	Byte DataType;
	int Width;
	char *FullName;
	char *Description;
} ;
#pragma pack(pop)

typedef TDLFieldItem TDLFieldList[10000];

typedef TDLFieldList *PDLFieldList;

struct TDLFields;
typedef TDLFields *PDLFields;

#pragma pack(push,1)
struct TDLFields
{
	
public:
	int ResultCode;
	int ConnectionHandle;
	char *TableName;
	int FieldCount;
	TDLFieldList *FieldList;
} ;
#pragma pack(pop)

struct TDLResultSetOpen;
typedef TDLResultSetOpen *PDLResultSetOpen;

#pragma pack(push,1)
struct TDLResultSetOpen
{
	
public:
	int ResultCode;
	int ConnectionHandle;
	char *QueryCommand;
	int ResultSetHandle;
	int FieldCount;
	TDLFieldList *FieldList;
} ;
#pragma pack(pop)

struct TDLResultSetClose;
typedef TDLResultSetClose *PDLResultSetClose;

#pragma pack(push,1)
struct TDLResultSetClose
{
	
public:
	int ResultCode;
	int ResultSetHandle;
} ;
#pragma pack(pop)

struct TDLResultSetFirst;
typedef TDLResultSetFirst *PDLResultSetFirst;

#pragma pack(push,1)
struct TDLResultSetFirst
{
	
public:
	int ResultCode;
	int ResultSetHandle;
} ;
#pragma pack(pop)

struct TDLResultSetNext;
typedef TDLResultSetNext *PDLResultSetNext;

#pragma pack(push,1)
struct TDLResultSetNext
{
	
public:
	int ResultCode;
	int ResultSetHandle;
} ;
#pragma pack(pop)

struct TDLResultSetEOF;
typedef TDLResultSetEOF *PDLResultSetEOF;

#pragma pack(push,1)
struct TDLResultSetEOF
{
	
public:
	int ResultCode;
	int ResultSetHandle;
	bool Eof;
} ;
#pragma pack(pop)

typedef bool TDLTransferFieldList[10000];

typedef TDLTransferFieldList *PDLTransferFieldList;

struct TDLResultSetRow;
typedef TDLResultSetRow *PDLResultSetRow;

#pragma pack(push,1)
struct TDLResultSetRow
{
	
public:
	int ResultCode;
	int ResultSetHandle;
	int TransferCount;
	TDLTransferFieldList *TransferList;
	char *RowBuffer;
	int RowBufSize;
} ;
#pragma pack(pop)

struct TDLResultSetFilter;
typedef TDLResultSetFilter *PDLResultSetFilter;

#pragma pack(push,1)
struct TDLResultSetFilter
{
	
public:
	int ResultCode;
	int ResultSetHandle;
} ;
#pragma pack(pop)

struct TDLResultSetSort;
typedef TDLResultSetSort *PDLResultSetSort;

#pragma pack(push,1)
struct TDLResultSetSort
{
	
public:
	int ResultCode;
	int ResultSetHandle;
} ;
#pragma pack(pop)

struct TDLErrorText;
typedef TDLErrorText *PDLErrorText;

#pragma pack(push,1)
struct TDLErrorText
{
	
public:
	int ConnectionHandle;
	int ResultSetHandle;
	char *ErrorText;
} ;
#pragma pack(pop)

struct TDLResultSetConfigure;
typedef TDLResultSetConfigure *PDLResultSetConfigure;

#pragma pack(push,1)
struct TDLResultSetConfigure
{
	
public:
	int ResultCode;
	int ConnectionHandle;
	char *QueryCommand;
	char *QueryStruct;
} ;
#pragma pack(pop)

typedef void __stdcall (*TDLGetTablesProc)(TDLTables &Params);

typedef void __stdcall (*TDLGetFieldsProc)(TDLFields &Params);

typedef void __stdcall (*TDLConnectionCloseProc)(TDLConnectionClose &Params);

typedef void __stdcall (*TDLConnectionConfigureProc)(TDLConnectionConfigure &Params);

typedef void __stdcall (*TDLConnectionOpenProc)(TDLConnectionOpen &Params);

typedef void __stdcall (*TDLGetErrorTextProc)(TDLErrorText &Params);

typedef void __stdcall (*TDLInformationProc)(TDLInformation &Params);

typedef void __stdcall (*TDLResultSetCloseProc)(TDLResultSetClose &Params);

typedef void __stdcall (*TDLResultSetEOFProc)(TDLResultSetEOF &Params);

typedef void __stdcall (*TDLResultSetFirstProc)(TDLResultSetFirst &Params);

typedef void __stdcall (*TDLResultSetGetRowProc)(TDLResultSetRow &Params);

typedef void __stdcall (*TDLResultSetNextProc)(TDLResultSetNext &Params);

typedef void __stdcall (*TDLResultSetOpenProc)(TDLResultSetOpen &Params);

typedef void __stdcall (*TDLResultSetSetFilterProc)(TDLResultSetFilter &Params);

typedef void __stdcall (*TDLResultSetSetSortProc)(TDLResultSetSort &Params);

typedef void __stdcall (*TDLResultSetConfigureProc)(TDLResultSetConfigure &Params);

struct TDLQueryEditor;
typedef TDLQueryEditor *PDLQueryEditor;

#pragma pack(push,1)
struct TDLQueryEditor
{
	
public:
	int ResultCode;
	int ConnectionHandle;
	char *QueryCommand;
	char *QueryStruct;
	TDLGetTablesProc GetTablesProc;
	TDLGetFieldsProc GetFieldsProc;
	TDLConnectionCloseProc ConnectionCloseProc;
	TDLConnectionConfigureProc ConnectionConfigureProc;
	TDLConnectionOpenProc ConnectionOpenProc;
	TDLGetErrorTextProc GetErrorTextProc;
	TDLInformationProc InformationProc;
	TDLResultSetCloseProc ResultSetCloseProc;
	TDLResultSetEOFProc ResultSetEOFProc;
	TDLResultSetFirstProc ResultSetFirstProc;
	TDLResultSetGetRowProc ResultSetGetRowProc;
	TDLResultSetNextProc ResultSetNextProc;
	TDLResultSetOpenProc ResultSetOpenProc;
	TDLResultSetSetFilterProc ResultSetSetFilterProc;
	TDLResultSetSetSortProc ResultSetSetSortProc;
} ;
#pragma pack(pop)

class DELPHICLASS TDLBuffer;
class PASCALIMPLEMENTATION TDLBuffer : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	char *FRowBuf;
	int FRowBufSize;
	char *FRowBufPtr;
	int FFieldIndex;
	int FAddPad;
	int FFieldCount;
	int __fastcall GetBufferSize(void);
	void * __fastcall GetBuffer(void);
	void __fastcall AddingNative(void);
	void __fastcall AddingFormatted(void);
	void __fastcall AllocateSpace(int AddSize);
	void __fastcall WriteStr(AnsiString Value);
	void __fastcall WriteLong(int Value);
	void __fastcall WriteInt64(__int64 Value);
	void __fastcall WriteBool(bool Value);
	void __fastcall WriteFloat(Extended Value);
	void __fastcall WriteCurr(System::Currency Value);
	void __fastcall WriteDateTime(System::TDateTime Value);
	void __fastcall WriteBuf(void *Buffer, int Len);
	
public:
	__fastcall TDLBuffer(void);
	__fastcall virtual ~TDLBuffer(void);
	void __fastcall Init(int AFieldCount);
	void __fastcall WriteNullData(void);
	void __fastcall WriteStrData(AnsiString FormatData, AnsiString NativeData);
	void __fastcall WriteLongData(AnsiString FormatData, int NativeData);
	void __fastcall WriteInt64Data(AnsiString FormatData, __int64 NativeData);
	void __fastcall WriteBoolData(AnsiString FormatData, bool NativeData);
	void __fastcall WriteFloatData(AnsiString FormatData, Extended NativeData);
	void __fastcall WriteCurrData(AnsiString FormatData, System::Currency NativeData);
	void __fastcall WriteBCDData(AnsiString FormatData, System::Currency NativeData);
	void __fastcall WriteDateTimeData(AnsiString FormatData, System::TDateTime NativeData);
	void __fastcall WriteBlobData(void *Buffer, int Len);
	__property int AddPad = {read=FAddPad, write=FAddPad, nodefault};
	__property int FieldCount = {read=FFieldCount, nodefault};
	__property int BufferSize = {read=GetBufferSize, nodefault};
	__property void * Buffer = {read=GetBuffer};
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint dt_String = 0x0;
static const Shortint dt_Integer = 0x1;
static const Shortint dt_Boolean = 0x2;
static const Shortint dt_Float = 0x3;
static const Shortint dt_Currency = 0x4;
static const Shortint dt_BCD = 0x5;
static const Shortint dt_Date = 0x6;
static const Shortint dt_Time = 0x7;
static const Shortint dt_DateTime = 0x8;
static const Shortint dt_Blob = 0x9;
static const Shortint dt_Memo = 0xa;
static const Shortint dt_Graphic = 0xb;
static const Shortint dt_Int64 = 0xc;

}	/* namespace Rvdlcommon */
using namespace Rvdlcommon;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Rvdlcommon
