home *** CD-ROM | disk | FTP | other *** search
/ Delphi Anthology / aDELPHI.iso / Runimage / Delphi50 / Source / Samples / ibproc32.pas < prev    next >
Pascal/Delphi Source File  |  1999-08-11  |  4KB  |  168 lines

  1. {********************************************************}
  2. {                                                        }
  3. {       Borland Deplphi                                  }
  4. {       InterBase EventAlerter components                }
  5. {       Copyright (c) 1995,99 Inprise Corporation        }
  6. {                                                        }
  7. {       Written by:                                      }
  8. {         James Thorpe                                   }
  9. {         CSA Australasia                                }
  10. {         Compuserve: 100035,2064                        }
  11. {         Internet:   csa@csaa.com.au                    }
  12. {                                                        }
  13. {********************************************************}
  14.  
  15. unit IBPROC32;
  16.  
  17. interface
  18. uses sysutils;
  19. {$F+}
  20.  
  21. const
  22.   isc_dpb_version1  = 1;
  23.   isc_dpb_user_name = 28;
  24.   isc_dpb_password  = 29;
  25.  
  26.   isc_tpb_concurrency = 2;
  27.   isc_tpb_version3  = 3;
  28.   isc_tpb_wait      = 6;
  29.   isc_tpb_write     = 9;
  30.  
  31. type
  32.   isc_db_handle = pointer;
  33.   pisc_db_handle = ^isc_db_handle;
  34.   isc_long = longint;
  35.   pisc_long = ^isc_long;
  36.   isc_status = longint;
  37.   pisc_status = ^isc_status;
  38.   isc_tr_handle = pointer;
  39.   pisc_tr_handle = ^isc_tr_handle;
  40.  
  41.   status_vector = array[0..19] of isc_status;
  42.   pstatus_vector = ^status_vector;
  43.   ppstatus_vector = ^pstatus_vector;
  44.  
  45.   Short = word;
  46.  
  47.   isc_teb = record
  48.     db_ptr: pisc_db_handle;
  49.     tpb_len: longint;
  50.     tpb_ptr: pchar;
  51.   end;
  52.   pisc_teb = ^isc_teb;
  53.  
  54.   TXSQLVar = record
  55.   end;
  56.  
  57.   TXSQLDA = record
  58.   end;
  59.   PTXSQLDA = ^TXSQLDA;
  60.  
  61.   isc_callback = procedure( ptr: pointer; length: short; updated: pchar);
  62.  
  63. { Interbase LIBS definitions }
  64.  
  65. //isc_attach_database
  66. TIscAttachDatabase = function(
  67.   status: pstatus_vector;
  68.   db_name_length: short;
  69.   db_name: pchar;
  70.   db_handle: pisc_db_handle;
  71.   parm_buffer_length: short;
  72.   parm_buffer: pchar
  73.   ): isc_status; stdcall;
  74.  
  75. // isc_cancel_events
  76. TIscCancelEvents = function(
  77.   status: pstatus_vector;
  78.   db_handle: pisc_db_handle;
  79.   event_id: pisc_long
  80.   ): isc_status; stdcall;
  81.  
  82. // isc_commit_transaction
  83. TIscCommitTransaction = function(
  84.   status: pstatus_vector;
  85.   trans_handle: pisc_tr_handle
  86.   ): isc_status; stdcall;
  87.  
  88. // isc_detach_database
  89. TIscDetachDatabase = function(
  90.   status: pstatus_vector;
  91.   db_handle: pisc_db_handle
  92.   ): isc_status; stdcall;
  93.  
  94. // isc_drop_database
  95. TIscDropDatabase = function(
  96.   status: pstatus_vector;
  97.   db_handle: pisc_db_handle
  98.   ): isc_status; stdcall;
  99.  
  100. // isc_dsql_execute_immediate
  101. TIscDsqlExecuteImmediate = function(
  102.   status: pstatus_vector;
  103.   db_handle: pisc_db_handle;
  104.   trans_handle: pisc_tr_handle;
  105.   length: short;
  106.   statement: PChar;
  107.   dialect: short;
  108.   xslqda: PTXSQLDA
  109.   ): isc_status; stdcall;
  110.  
  111. // isc_event_block
  112. TIscEventBlock = function(
  113.   event_buf: pointer;
  114.   result_buf: pointer;
  115.   count: short;
  116.   name1: pchar):  longint; cdecl;
  117.  
  118. // isc_event_counts
  119. TIscEventCounts = procedure(
  120.   status: pstatus_vector;
  121.   buffer_length: short;
  122.   event_buffer: pchar;
  123.   result_buffer: pchar
  124.   ); stdcall;
  125.  
  126. // isc_free
  127. TIscFree = function(
  128.   buffer: PChar
  129.   ): isc_long; stdcall;
  130.  
  131. // isc_interprete
  132. TIscInterprete = function(
  133.   buffer: PChar;
  134.   status: ppstatus_vector
  135.   ): isc_status; stdcall;
  136.  
  137. // isc_que_events
  138. TIscQueEvents = function(
  139.   status: pstatus_vector;
  140.   db_handle: pisc_db_handle;
  141.   event_id: pisc_long;
  142.   length: short;
  143.   event_buffer: pchar;
  144.   event_function: isc_callback;
  145.   event_function_arg: pointer
  146.   ): isc_status; stdcall;
  147.  
  148. // isc_rollback_transaction
  149. TIscRollbackTransaction = function(
  150.   status: pstatus_vector;
  151.   trans_handle: pisc_tr_handle
  152.   ): isc_status; stdcall;
  153.  
  154. // isc_start_multiple
  155. TIscStartMultiple = function(
  156.   status: pstatus_vector;
  157.   trans_handle: pisc_tr_handle;
  158.   db_handle_count: short;
  159.   teb_vector_address: pisc_teb
  160.   ): isc_status; stdcall;
  161.  
  162. // load DLL error exception
  163. EDLLLoadError = class(Exception);
  164.  
  165. implementation
  166.  
  167. end.
  168.