PageRenderTime 30ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/Gedemin/IBX/IBInstallHeader.pas

http://gedemin.googlecode.com/
Pascal | 266 lines | 177 code | 38 blank | 51 comment | 0 complexity | 435a7719bb50b725e10ccca2d04f0ec0 MD5 | raw file
  1{************************************************************************}
  2{                                                                        }
  3{       Borland Delphi Visual Component Library                          }
  4{       InterBase Express core components                                }
  5{                                                                        }
  6{       Copyright (c) 1998-2001 Borland Software Corporation             }
  7{                                                                        }
  8{    InterBase Express is based in part on the product                   }
  9{    Free IB Components, written by Gregory H. Deatz for                 }
 10{    Hoagland, Longo, Moran, Dunst & Doukas Company.                     }
 11{    Free IB Components is used under license.                           }
 12{                                                                        }
 13{    The contents of this file are subject to the InterBase              }
 14{    Public License Version 1.0 (the "License"); you may not             }
 15{    use this file except in compliance with the License. You may obtain }
 16{    a copy of the License at http://www.borland.com/interbase/IPL.html  }
 17{    Software distributed under the License is distributed on            }
 18{    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either              }
 19{    express or implied. See the License for the specific language       }
 20{    governing rights and limitations under the License.                 }
 21{    The Original Code was created by InterBase Software Corporation     }
 22{       and its successors.                                              }
 23{    Portions created by Borland Software Corporation are Copyright      }
 24{       (C) Borland Software Corporation. All Rights Reserved.           }
 25{    Contributor(s): Jeff Overcash                                       }
 26{                                                                        }
 27{************************************************************************}
 28
 29{
 30  InterBase Express provides component interfaces to
 31  functions introduced in InterBase 6.0.  The Services
 32  components (TIB*Service, TIBServerProperties) and
 33  Install components (TIBInstall, TIBUninstall, TIBSetup)
 34  function only if you have installed InterBase 6.0 or
 35  later software
 36}
 37
 38unit IBInstallHeader;
 39
 40
 41interface
 42
 43{ InterBase Install API interface }
 44type
 45  OPTIONS_HANDLE = integer;
 46  POPTIONS_HANDLE = ^OPTIONS_HANDLE;
 47  MSG_NO = longint;
 48  OPT = longint;
 49  TEXT = PChar;
 50  FP_ERROR = function(IscCode: MSG_NO; UserContext: Pointer;
 51                             const ActionDescription : TEXT): Integer; stdcall;
 52  FP_STATUS = function(Status: Integer; UserContext: Pointer;
 53                              const ActionDescription: TEXT): Integer; stdcall;
 54
 55const
 56   IB_INSTALL_DLL = 'ibinstall.dll'; {do not localize}
 57  { These are the values the FP_ERROR routine can return. }
 58  isc_install_fp_retry    = -1;
 59  isc_install_fp_continue =  0;
 60  isc_install_fp_abort    =  1;
 61
 62   { isc_install_get_info info_types }
 63   isc_install_info_destination  =  1;
 64   isc_install_info_opspace  = 2     ;
 65   isc_install_info_opname =  3      ;
 66   isc_install_info_opdescription  = 4;
 67
 68
 69  ISC_INSTALL_MAX_MESSAGE_LEN   = 300;
 70  ISC_INSTALL_MAX_MESSAGES      = 200;
 71  ISC_INSTALL_MAX_PATH          = 256;
 72
 73  { Basic Components used to install InterBase }
 74  INTERBASE                     = 1000;
 75  IB_SERVER                     = 1001;
 76  IB_CLIENT                     = 1002;
 77
 78  IB_CMD_TOOLS                  = 1003;
 79  IB_CMD_TOOLS_DB_MGMT          = 1004;
 80  IB_CMD_TOOLS_USR_MGMT         = 1005;
 81  IB_CMD_TOOLS_DB_QUERY         = 1006;
 82
 83  IB_GUI_TOOLS                  = 1007;
 84
 85  IB_DOC                        = 1011;
 86  IB_EXAMPLES                   = 1012;
 87  IB_EXAMPLE_API                = 1013;
 88  IB_EXAMPLE_DB                 = 1014;
 89  IB_DEV                        = 1015;
 90
 91  IB_CONNECTIVITY_SERVER        = 1100;
 92  IB_CONNECTIVITY               = 1101;
 93  IB_ODBC_CLIENT                = 1102;
 94  IB_JDBC_CLIENT                = 1103;
 95  IB_OLEDB_CLIENT               = 1104;
 96
 97  { Error and warning codes }
 98  isc_install_optlist_empty           = -1;
 99  isc_install_actlist_empty           = -2;
100  isc_install_fp_copy_delayed         = -3;
101  isc_install_fp_delete_delayed       = -4;
102  isc_install_option_not_found        = -5;
103  isc_install_msg_version             = -6;
104  isc_install_cant_load_msg           = -7;
105  isc_install_invalid_msg             = -8;
106  isc_install_invalid_tbl             = -9;
107  isc_install_cant_create_msg         = -10;
108  isc_install_handle_not_allocated    = -11;
109  isc_install_odbc_comp_notfound      = -12;
110  isc_install_cant_delete             = -13;
111  isc_install_cant_rmdir              = -14;
112  isc_install_key_nonempty            = -15;
113
114  isc_install_success                 = 0;
115
116  { File and directory related errors }
117  isc_install_file_error              = isc_install_success;
118  isc_install_path_not_valid          = isc_install_file_error+1;
119  isc_install_path_not_exists         = isc_install_file_error+2;
120  isc_install_cant_write              = isc_install_file_error+3;
121  isc_install_type_unknown            = isc_install_file_error+4;
122  isc_install_cant_move_file          = isc_install_file_error+5;
123  isc_install_device_not_valid        = isc_install_file_error+6;
124  isc_install_data_truncated          = isc_install_file_error+7;
125  isc_install_cant_get_temp           = isc_install_file_error+8;
126  isc_install_no_file                 = isc_install_file_error+9;
127  isc_install_cant_load_lib           = isc_install_file_error+10;
128  isc_install_cant_lookup_lib         = isc_install_file_error+11;
129  isc_install_file_exists             = isc_install_file_error+12;
130  isc_install_cant_open_log           = isc_install_file_error+13;
131  isc_install_write_error             = isc_install_file_error+14;
132  isc_install_read_error              = isc_install_file_error+15;
133  isc_install_invalid_log             = isc_install_file_error+16;
134  isc_install_cant_read               = isc_install_file_error+17;
135  isc_install_no_diskspace            = isc_install_file_error+18;
136  isc_install_cant_create_dir         = isc_install_file_error+19;
137  isc_install_msg_syntax              = isc_install_file_error+20;
138  isc_install_fp_delete_error         = isc_install_file_error+21;
139  isc_install_fp_rename_error         = isc_install_file_error+22;
140  isc_install_fp_copy_error           = isc_install_file_error+23;
141
142  { Precheck related errors }
143  isc_install_precheck_error          = isc_install_file_error+24;
144  isc_install_system_not_supported    = isc_install_precheck_error;
145  isc_install_server_running          = isc_install_precheck_error+1;
146  isc_install_classic_found           = isc_install_precheck_error+2;
147  isc_install_no_privileges           = isc_install_precheck_error+3;
148  isc_install_cant_get_free_space     = isc_install_precheck_error+4;
149  isc_install_guardian_running        = isc_install_precheck_error+5;
150  isc_install_invalid_option          = isc_install_precheck_error+6;
151  isc_install_invalid_handle          = isc_install_precheck_error+7;
152  isc_install_message_not_found       = isc_install_precheck_error+8;
153
154  { TCP/IP services related }
155  isc_install_ip_error                = isc_install_precheck_error+9;
156  isc_install_no_stack                = isc_install_ip_error;
157  isc_install_cant_add_service        = isc_install_ip_error+1;
158  isc_install_invalid_port            = isc_install_ip_error+2;
159  isc_install_invalid_service         = isc_install_ip_error+3;
160  isc_install_no_proto                = isc_install_ip_error+4;
161  isc_install_no_services_entry       = isc_install_ip_error+5;
162  isc_install_sock_error              = isc_install_ip_error+6;
163  isc_install_conversion_error        = isc_install_ip_error+7;
164
165
166  { Operations errors }
167  isc_install_op_error                = isc_install_ip_error+8;
168  isc_install_cant_copy               = isc_install_op_error;
169  isc_install_no_mem                  = isc_install_op_error+1;
170  isc_install_queue_failed            = isc_install_op_error+2;
171  isc_install_invalid_param           = isc_install_op_error+3;
172  isc_install_fp_error_exception      = isc_install_op_error+4;
173  isc_install_fp_status_exception     = isc_install_op_error+5;
174  isc_install_user_aborted            = isc_install_op_error+6;
175
176  { Registry related errors }
177  isc_install_reg_error               = isc_install_op_error+7;
178  isc_install_key_exists              = isc_install_reg_error;
179  isc_install_cant_create_key         = isc_install_reg_error+1;
180  isc_install_cant_set_value          = isc_install_reg_error+2;
181  isc_install_cant_open_key           = isc_install_reg_error+3;
182  isc_install_cant_delete_key         = isc_install_reg_error+4;
183  isc_install_cant_query_key          = isc_install_reg_error+5;
184  isc_install_cant_delete_value       = isc_install_reg_error+6;
185
186  { OS services related errors }
187  isc_install_serv_error              = isc_install_reg_error+7;
188  isc_install_service_existed         = isc_install_serv_error;
189  isc_install_cant_create_service     = isc_install_serv_error+1;
190  isc_install_cant_open_service       = isc_install_serv_error+2;
191  isc_install_cant_query_service      = isc_install_serv_error+3;
192  isc_install_service_running         = isc_install_serv_error+4;
193  isc_install_cant_delete_service     = isc_install_serv_error+5;
194  isc_install_cant_open_manager       = isc_install_serv_error+6;
195  isc_install_system_error            = isc_install_serv_error+7;
196  isc_install_com_regfail             = isc_install_serv_error+8;
197  isc_install_dcom_required           = isc_install_serv_error+9;
198
199  { ODBC installation errors }
200  isc_install_odbc_error              = isc_install_serv_error+10;
201  isc_install_odbc_general            = isc_install_odbc_error;
202  isc_install_core_version            = isc_install_odbc_error+1;
203  isc_install_drv_version             = isc_install_odbc_error+2;
204  isc_install_tran_version            = isc_install_odbc_error+3;
205
206type
207Tisc_install_clear_options = function(hOption: POPTIONS_HANDLE):MSG_NO;
208                                       stdcall;
209
210Tisc_install_execute = function (hOption: OPTIONS_HANDLE;
211                                 src_dir: TEXT;
212                                 dest_dir: TEXT;
213                                 status_func: FP_STATUS;
214                                 status_data: pointer;
215                                 error_func: FP_ERROR;
216                                 error_data: pointer;
217                                 uninstal_file_name: TEXT):MSG_NO;
218                                 stdcall;
219
220Tisc_install_get_info = function (info_type :integer;
221                                  option :OPT;
222                                  info_buffer : Pointer;
223                                  buf_len : Cardinal): MSG_NO;
224                                  stdcall;
225
226
227
228Tisc_install_get_message = function (hOption: OPTIONS_HANDLE;
229                                     message_no: MSG_NO;
230                                     message_txt: Pointer;
231                                     message_len: Cardinal):MSG_NO;
232                                     stdcall;
233
234Tisc_install_load_external_text = function (msg_file_name: TEXT):MSG_NO;
235                                            stdcall;
236
237Tisc_install_precheck = function (hOption: OPTIONS_HANDLE;
238                                  src_dir: TEXT;
239                                  dest_dir: TEXT):MSG_NO;
240                                  stdcall;
241
242Tisc_install_set_option = function (hOption: POPTIONS_HANDLE;
243                                    option: OPT):MSG_NO;
244                                    stdcall;
245
246Tisc_uninstall_execute = function (uninstall_file_name: TEXT;
247                                   status_func: FP_STATUS;
248                                   status_data: pointer;
249                                   error_func: FP_ERROR;
250                                   error_data: pointer):MSG_NO;
251                                   stdcall;
252
253Tisc_uninstall_precheck = function (uninstall_file_name: TEXT):MSG_NO;
254                                    stdcall;
255
256Tisc_install_unset_option = function (hOption: POPTIONS_HANDLE;
257                                      option: OPT):MSG_NO;
258                                      stdcall;
259implementation
260
261
262  { EXECute ....check of Install mode and call Install_execute or unistall_execute }
263  { raise an exception on error from the dll } 
264  { call the onWarning handler on warning from DLL }
265  { GetSpaceAvailable -- call isc_install_get_info function }
266end.