home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 May / Chip_2002-05_cd1.bin / chplus / cpp / 5 / Komponety.exe / ibproc32.h < prev    next >
C/C++ Source or Header  |  1998-02-09  |  5KB  |  142 lines

  1. //---------------------------------------------------------------------------
  2. // Borland C++Builder
  3. // Copyright (c) 1987, 1998 Borland International Inc.  All Rights Reserved.
  4. //---------------------------------------------------------------------------
  5. #ifndef Ibproc32H
  6. #define Ibproc32H
  7. //---------------------------------------------------------------------------
  8. #include <SysUtils.hpp>
  9. #include <System.hpp>
  10.  
  11. namespace Ibproc32
  12. {
  13. //-- type declarations -------------------------------------------------------
  14. typedef void *isc_db_handle;
  15.  
  16. typedef System::Pointer *pisc_db_handle;
  17.  
  18. typedef int isc_long;
  19.  
  20. typedef long *pisc_long;
  21.  
  22. typedef int isc_status;
  23.  
  24. typedef long *pisc_status;
  25.  
  26. typedef void *isc_tr_handle;
  27.  
  28. typedef System::Pointer *pisc_tr_handle;
  29.  
  30. typedef long status_vector[20];
  31.  
  32. typedef status_vector *pstatus_vector;
  33.  
  34. typedef pstatus_vector *ppstatus_vector;
  35.  
  36. typedef WORD IBPROC32_short;
  37.  
  38. typedef struct __isc_teb
  39. {
  40.     System::Pointer *db_ptr;
  41.     long tpb_len;
  42.     char *tpb_ptr;
  43. }isc_teb ;
  44.  
  45. typedef isc_teb *pisc_teb;
  46.  
  47. typedef struct __TXSQLVar
  48. {
  49. }TXSQLVar ;
  50.  
  51. typedef struct __TXSQLDA
  52. {
  53. }TXSQLDA ;
  54.  
  55. typedef TXSQLDA *PTXSQLDA;
  56.  
  57. typedef void __fastcall (*isc_callback)(System::Pointer ptr, WORD length, System::PChar updated
  58.     );
  59.  
  60. typedef long __stdcall (*TIscAttachDatabase)(pstatus_vector status, WORD db_name_length
  61.     , System::PChar db_name, pisc_db_handle db_handle, WORD parm_buffer_length, System::PChar parm_buffer
  62.     );
  63.  
  64. typedef long __stdcall (*TIscCancelEvents)(pstatus_vector status, pisc_db_handle db_handle
  65.     , pisc_long event_id);
  66.  
  67. typedef long __stdcall (*TIscCommitTransaction)(pstatus_vector status, pisc_tr_handle trans_handle
  68.     );
  69.  
  70. typedef long __stdcall (*TIscDetachDatabase)(pstatus_vector status, pisc_db_handle db_handle
  71.     );
  72.  
  73. typedef long __stdcall (*TIscDropDatabase)(pstatus_vector status, pisc_db_handle db_handle
  74.     );
  75.  
  76. typedef long __stdcall (*TIscDsqlExecuteImmediate)(pstatus_vector status, pisc_db_handle 
  77.     db_handle, pisc_tr_handle trans_handle, WORD length, System::PChar statement, System::Word 
  78.     dialect, PTXSQLDA xslqda);
  79.  
  80. typedef long __cdecl (*TIscEventBlock)(System::Pointer event_buf, System::Pointer result_buf
  81.     , WORD count, ...);
  82.  
  83. typedef void __stdcall (*TIscEventCounts)(pstatus_vector status, System::Word buffer_length, System::PChar
  84.     event_buffer, System::PChar result_buffer);
  85.  
  86. typedef long __stdcall (*TIscFree)(System::PChar buffer);
  87.     
  88. typedef long __stdcall (*TIscInterprete)(System::PChar buffer, ppstatus_vector status);
  89.  
  90. typedef long __stdcall (*TIscQueEvents)(pstatus_vector status, pisc_db_handle db_handle, 
  91.     pisc_long event_id, WORD length, System::PChar event_buffer, isc_callback event_function, System::Pointer 
  92.     event_function_arg);
  93.  
  94. typedef System::Longint __stdcall (*TIscRollbackTransaction)(pstatus_vector status, pisc_tr_handle trans_handle
  95.     );
  96.  
  97. typedef System::Longint __stdcall (*TIscStartMultiple)(pstatus_vector status, pisc_tr_handle trans_handle
  98.     , WORD db_handle_count, pisc_teb teb_vector_address);
  99.  
  100. class EDLLLoadError : public Sysutils::Exception
  101. {
  102.     typedef EDLLLoadError ThisClass;
  103.     typedef Sysutils::Exception inherited;
  104.     
  105. public:
  106.     __fastcall EDLLLoadError(const System::AnsiString Msg) : Sysutils::Exception(
  107.         Msg) { }
  108.     __fastcall EDLLLoadError(const System::AnsiString Msg, const TVarRec *
  109.         Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  110.     __fastcall EDLLLoadError(int Ident) : Sysutils::Exception(
  111.         Ident) { }
  112.     __fastcall EDLLLoadError(int Ident, const TVarRec *Args
  113.         , const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  114.     __fastcall EDLLLoadError(const System::AnsiString Msg, int
  115.         AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  116.     __fastcall EDLLLoadError(const System::AnsiString Msg, const TVarRec
  117.         *Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args
  118.         , Args_Size, AHelpContext) { }
  119.     __fastcall EDLLLoadError(int Ident, int AHelpContext
  120.         ) : Sysutils::Exception(Ident, AHelpContext) { }
  121.     __fastcall EDLLLoadError(int Ident, const TVarRec *
  122.         Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, 
  123.         Args, Args_Size, AHelpContext) { }
  124.     __fastcall virtual ~EDLLLoadError(void) { }
  125. };
  126.  
  127. //-- var, const, procedure ---------------------------------------------------
  128. #define isc_dpb_version1 System::BYTE(1)
  129. #define isc_dpb_user_name System::BYTE(28)
  130. #define isc_dpb_password System::Byte(29)
  131. #define isc_tpb_concurrency System::Byte(2)
  132. #define isc_tpb_version3 System::Byte(3)
  133. #define isc_tpb_wait System::Byte(6)
  134. #define isc_tpb_write System::Byte(9)
  135.  
  136. }       /* namespace Ibproc32 */
  137. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  138. using namespace Ibproc32;
  139. #endif
  140. //-- end unit ----------------------------------------------------------------
  141. #endif  // IBPROC32H
  142.