1{$IFDEF FPC}
2{$mode objfpc}
3{$h+}
4{$PACKRECORDS C}
5{$ENDIF}
6unit pxlib;
7interface
8
9uses
10{$ifdef unix}
11  unixtype,
12{$endif}
13  ctypes;
14
15{ Automatically converted by H2Pas 1.0.0 from pxlib.h
16  The following command line parameters were used:
17  pxlib.h -D -l pxlib -o pxlib.pp -P -u pxlib -C -p
18  MVC : Heavily edited after generation. C is a mess :( }
19
20const
21{$ifdef windows}
22  pxlibraryname='pxlib.dll';
23{$else}
24  pxlibraryname='libpx.so.0'; { Default name }
25{$endif}
26
27const
28
29  px_true = 1;
30  px_false = 0;
31
32  { Error codes  }
33
34  PX_MemoryError = 1;
35  PX_IOError = 2;
36  PX_RuntimeError = 3;
37  PX_Warning = 100;
38
39  { IO Stream types  }
40
41  pxfIOFile   = 1;      { pxfIOGsf is defined as 2 in paradox-gsf.h  }
42  pxfIOStream = 3;
43
44  { Field types  }
45
46  pxfAlpha       = $01;
47  pxfDate        = $02;
48  pxfShort       = $03;
49  pxfLong        = $04;
50  pxfCurrency    = $05;
51  pxfNumber      = $06;
52  pxfLogical     = $09;
53  pxfMemoBLOb    = $0C;
54  pxfBLOb        = $0D;
55  pxfFmtMemoBLOb = $0E;
56  pxfOLE         = $0F;
57  pxfGraphic     = $10;
58  pxfTime        = $14;
59  pxfTimestamp   = $15;
60  pxfAutoInc     = $16;
61  pxfBCD         = $17;
62  pxfBytes       = $18;
63  pxfNumTypes    = $18;
64
65  { File types  }
66  pxfFileTypIndexDB = 0;
67  pxfFileTypPrimIndex = 1;
68  pxfFileTypNonIndexDB = 2;
69  pxfFileTypNonIncSecIndex = 3;
70  pxfFileTypSecIndex = 4;
71  pxfFileTypIncSecIndex = 5;
72  pxfFileTypNonIncSecIndexG = 6;
73  pxfFileTypSecIndexG = 7;
74  pxfFileTypIncSecIndexG = 8;
75
76  { File modes  }
77  pxfFileRead  = $1;
78  pxfFileWrite = $2;
79
80Type
81  PLongint  = ^Longint;
82  PSmallInt = ^SmallInt;
83  PByte     = ^Byte;
84  PWord     = ^Word;
85  PDWord    = ^DWord;
86  PDouble   = ^Double;
87  Pcchar    = pchar;
88
89{$ifndef unix}
90  size_t    = Integer;
91{$endif}
92
93  PFILE  = ^FILE;
94  iconv_t = pointer;
95
96  Ppxstream_t = ^pxstream_t;
97  Ppxfield_t = ^pxfield_t;
98  ppxval_t = ^pxval_t;
99  Ppxhead_t = ^pxhead_t;
100  Ppxdoc_t = ^pxdoc_t;
101  ppxblockcache_t = ^pxblockcache_t;
102  ppxmbblockinfo_t = ^pxmbblockinfo_t;
103  Ppxblob_t = ^pxblob_t;
104  Pmbhead_t = ^mbhead_t;
105  Ppxdatablockinfo_t = ^pxdatablockinfo_t;
106  PPpxval_t = ^ppxval_t;
107  Ppcchar = ^pcchar;
108
109  Ppx_field = ^px_field;
110  px_field = record
111    px_fname : pcchar;
112    px_ftype : cchar;
113    px_flen : cint;
114    px_fdc : cint;
115  end;
116  pxfield_t = px_field;
117
118  Ppx_val = ^px_val;
119  px_val = record
120    isnull : cchar;
121    _type : cint;
122    value : record
123    case longint of
124      0 : ( lval : clong );
125      1 : ( dval : double );
126      2 : ( str : record
127            val : pcchar;
128            len : cint;
129            end );
130    end;
131  end;
132  pxval_t = px_val;
133
134  Ppx_head = ^px_head;
135  px_head = record
136    px_tablename : pcchar;
137    px_recordsize : cint;
138    px_filetype : cchar;
139    px_fileversion : cint;
140    px_numrecords : cint;
141    px_theonumrecords : cint;
142    px_numfields : cint;
143    px_maxtablesize : cint;
144    px_headersize : cint;
145    px_fileblocks : cuint;
146    px_firstblock : cuint;
147    px_lastblock : cuint;
148    px_indexfieldnumber : cint;
149    px_indexroot : cint;
150    px_numindexlevels : cint;
151    px_writeprotected : cint;
152    px_doscodepage : cint;
153    px_primarykeyfields : cint;
154    px_modifiedflags1 : cchar;
155    px_modifiedflags2 : cchar;
156    px_sortorder : cchar;
157    px_autoinc : cint;
158    px_fileupdatetime : cint;
159    px_refintegrity : cchar;
160    px_fields : Ppx_field;
161    px_encryption : culong;
162  end;
163  pxhead_t = px_head;
164
165  Ppx_stream = ^px_stream;
166  px_stream = record
167    _type : cint;
168    mode : cint;
169    close : cint;
170    s : record
171        case longint of
172           0 : ( fp : PFILE );
173           1 : ( stream : pointer );
174        end;
175    read : function (p:Ppxdoc_t; stream:Ppxstream_t; numbytes:size_t; buffer:pointer):size_t;cdecl;
176    seek : function (p:Ppxdoc_t; stream:Ppxstream_t; offset:clong; whence:cint):cint; cdecl;
177    tell : function (p:Ppxdoc_t; stream:Ppxstream_t):clong; cdecl;
178    write : function (p:Ppxdoc_t; stream:Ppxstream_t; numbytes:size_t; buffer:pointer):size_t;cdecl;
179  end;
180  pxstream_t = px_stream;
181
182  Ppx_doc = ^px_doc;
183  px_doc = record
184    px_stream : Ppxstream_t;
185    px_name : pcchar;
186    px_close_fp : cint;
187    px_head : Ppxhead_t;
188    px_data : pointer;
189    px_datalen : cint;
190    px_indexdata : pointer;
191    px_indexdatalen : cint;
192    px_pindex : Ppxdoc_t;
193    px_blob : Ppxblob_t;
194    last_position : cint;
195    warnings : cint;
196    writeproc : function (p:Ppxdoc_t; data:pointer; size:size_t):size_t; cdecl;
197    errorhandler : procedure (p:Ppxdoc_t; level:cint; msg:pcchar; data:pointer); cdecl;
198    errorhandler_user_data : pointer;
199    malloc : function (p:Ppxdoc_t; size:size_t; caller:pcchar):pointer; cdecl;
200    calloc : function (p:Ppxdoc_t; size:size_t; caller:pcchar):pointer; cdecl;
201    realloc : function (p:Ppxdoc_t; mem:pointer; size:size_t; caller:pcchar):pointer; cdecl;
202    free : procedure (p:Ppxdoc_t; mem:pointer); cdecl;
203    read : function (p:Ppxdoc_t; stream:Ppxstream_t; numbytes:size_t; buffer:pointer):size_t; cdecl;
204    seek : function (p:Ppxdoc_t; stream:Ppxstream_t; offset:clong; whence:cint):cint; cdecl;
205    tell : function (p:Ppxdoc_t; stream:Ppxstream_t):clong; cdecl;
206    write : function (p:Ppxdoc_t; stream:Ppxstream_t; numbytes:size_t; buffer:pointer):size_t; cdecl;
207    targetencoding : pcchar;
208    inputencoding : pcchar;
209    out_iconvcd : iconv_t;
210    in_iconvcd : iconv_t;
211    curblocknr : clong;
212    curblockdirty : cint;
213    curblock : pcuchar;
214  end;
215  pxdoc_t = px_doc;
216
217  px_blockcache = record
218    start : clong;
219    size : size_t;
220    data : pcuchar;
221  end;
222  pxblockcache_t = px_blockcache;
223
224  Ppx_mbblockinfo = ^px_mbblockinfo;
225  px_mbblockinfo = record
226    number : cint;
227    _type : cchar;
228    numblobs : cchar;
229    numblocks : cint;
230    allocspace : cint;
231  end;
232  pxmbblockinfo_t = px_mbblockinfo;
233
234  px_blob = record
235    mb_name : pcchar;
236    pxdoc : Ppxdoc_t;
237    mb_stream : Ppxstream_t;
238    mb_head : Pmbhead_t;
239    used_datablocks : cint;
240    subblockoffset : cint;
241    subblockinneroffset : cint;
242    subblockfree : cint;
243    subblockblobcount : cint;
244    read : function (p:Ppxblob_t; stream:Ppxstream_t; numbytes:size_t; buffer:pointer):size_t; cdecl;
245    seek : function (p:Ppxblob_t; stream:Ppxstream_t; offset:clong; whence:cint):cint; cdecl;
246    tell : function (p:Ppxblob_t; stream:Ppxstream_t):clong; cdecl;
247    write : function (p:Ppxblob_t; stream:Ppxstream_t; numbytes:size_t; buffer:pointer):size_t; cdecl;
248    blockcache : pxblockcache_t;
249    blocklist : Ppxmbblockinfo_t;
250    blocklistlen : cint;
251  end;
252  pxblob_t = px_blob;
253
254  Pmb_head = ^mb_head;
255  mb_head = record
256    modcount : cint;
257  end;
258  mbhead_t = mb_head;
259
260  Ppx_datablockinfo = ^px_datablockinfo;
261  px_datablockinfo = record
262    blockpos : clong;
263    recordpos : clong;
264    size : cint;
265    recno : cint;
266    numrecords : cint;
267    prev : cint;
268    next : cint;
269    number : cint;
270  end;
271  pxdatablockinfo_t = px_datablockinfo;
272
273  Ppx_pindex = ^px_pindex;
274  px_pindex = record
275    data : pcchar;
276    blocknumber : cint;
277    numrecords : cint;
278    dummy : cint;
279    myblocknumber : cint;
280    level : cint;
281  end;
282  pxpindex_t = px_pindex;
283
284  TPXErrorhandler = procedure (p:Ppxdoc_t; _type:cint; msg:pcchar; data:pointer); cdecl;
285  TPXAllocHandler = function (p:Ppxdoc_t; size:size_t; caller:pcchar):pointer; cdecl;
286  TPXReAllocHandler = function (p:Ppxdoc_t; mem:pointer; size:size_t; caller:pcchar):pointer;cdecl;
287  TPXFreeHandler = procedure (p:Ppxdoc_t; mem:pointer); cdecl;
288
289var
290  PX_get_majorversion : function:cint;cdecl;
291  PX_get_minorversion : function:cint;cdecl;
292  PX_get_subminorversion : function:cint;cdecl;
293  PX_has_recode_support : function:cint;cdecl;
294  PX_has_gsf_support : function:cint;cdecl;
295  PX_is_bigendian : function:cint;cdecl;
296  PX_get_builddate : function:pcchar;cdecl;
297  PX_boot : procedure;cdecl;
298  PX_shutdown : procedure;cdecl;
299  PX_new3 : function(errorhandler: TPXErrorHandler;
300                     allocproc: TPXAllocHandler;
301                     reallocproc: TPXReallocHandler;
302                     freeproc : TPXFreeHandler;
303                     errorhandler_user_data : pointer) : Ppxdoc_t; cdecl;
304  PX_new2 : function(errorhandler: TPXErrorHandler;
305                     allocproc: TPXAllocHandler;
306                     reallocproc: TPXReallocHandler;
307                     freeproc : TPXFreeHandler) : Ppxdoc_t; cdecl;
308  PX_new : function:Ppxdoc_t;cdecl;
309  PX_open_fp : function(pxdoc:Ppxdoc_t; fp:PFILE):cint;cdecl;
310  PX_open_file : function(pxdoc:Ppxdoc_t; filename:pcchar):cint;cdecl;
311  PX_create_file : function(pxdoc:Ppxdoc_t; pxf:Ppxfield_t; numfields:cint; filename:pcchar; _type:cint):cint;cdecl;
312  PX_create_fp : function(pxdoc:Ppxdoc_t; pxf:Ppxfield_t; numfields:cint; fp:PFILE; _type:cint):cint;cdecl;
313  PX_get_opaque : function(pxdoc:Ppxdoc_t):pointer;cdecl;
314  PX_write_primary_index : function(pxdoc:Ppxdoc_t; pxindex:Ppxdoc_t):cint;cdecl;
315  PX_read_primary_index : function(pindex:Ppxdoc_t):cint;cdecl;
316  PX_add_primary_index : function(pxdoc:Ppxdoc_t; pindex:Ppxdoc_t):cint;cdecl;
317  PX_get_record : function(pxdoc:Ppxdoc_t; recno:cint; data:pcchar):pcchar;cdecl;
318  PX_get_record2 : function(pxdoc:Ppxdoc_t; recno:cint; data:pcchar; deleted:pcint; pxdbinfo:Ppxdatablockinfo_t):pcchar;cdecl;
319  PX_put_recordn : function(pxdoc:Ppxdoc_t; data:pcchar; recpos:cint):cint;cdecl;
320  PX_put_record : function(pxdoc:Ppxdoc_t; data:pcchar):cint;cdecl;
321  PX_insert_record : function(pxdoc:Ppxdoc_t; dataptr:PPpxval_t):cint;cdecl;
322  PX_update_record : function(pxdoc:Ppxdoc_t; dataptr:PPpxval_t; recno:cint):cint;cdecl;
323  PX_delete_record : function(pxdoc:Ppxdoc_t; recno:cint):cint;cdecl;
324  PX_retrieve_record : function(pxdoc:Ppxdoc_t; recno:cint):PPpxval_t;cdecl;
325  PX_close : procedure(pxdoc:Ppxdoc_t);cdecl;
326  PX_delete : procedure(pxdoc:Ppxdoc_t);cdecl;
327  PX_pack : function(pxdoc:Ppxdoc_t):cint;cdecl;
328  PX_get_fields : function(pxdoc:Ppxdoc_t):Ppxfield_t;cdecl;
329  PX_get_field : function(pxdoc:Ppxdoc_t; i:cint):Ppxfield_t;cdecl;
330  PX_get_num_fields : function(pxdoc:Ppxdoc_t):cint;cdecl;
331  PX_get_num_records : function(pxdoc:Ppxdoc_t):cint;cdecl;
332  PX_get_recordsize : function(pxdoc:Ppxdoc_t):cint;cdecl;
333  PX_set_parameter : function(pxdoc:Ppxdoc_t; name:pcchar; value:pcchar):cint;cdecl;
334  PX_get_parameter : function(pxdoc:Ppxdoc_t; name:pcchar; value:Ppcchar):cint;cdecl;
335  PX_set_value : function(pxdoc:Ppxdoc_t; name:pcchar; value:double):cint;cdecl;
336  PX_get_value : function(pxdoc:Ppxdoc_t; name:pcchar; value:Pdouble):cint;cdecl;
337  PX_set_targetencoding : function(pxdoc:Ppxdoc_t; encoding:pcchar):cint;cdecl;
338  PX_set_inputencoding : function(pxdoc:Ppxdoc_t; encoding:pcchar):cint;cdecl;
339  PX_set_tablename : function(pxdoc:Ppxdoc_t; tablename:pcchar):cint;cdecl;
340  PX_set_blob_file : function(pxdoc:Ppxdoc_t; filename:pcchar):cint;cdecl;
341  PX_set_blob_fp : function(pxdoc:Ppxdoc_t; fp:PFILE):cint;cdecl;
342  PX_has_blob_file : function(pxdoc:Ppxdoc_t):cint;cdecl;
343  PX_new_blob : function(pxdoc:Ppxdoc_t):Ppxblob_t;cdecl;
344  PX_open_blob_fp : function(pxdoc:Ppxblob_t; fp:PFILE):cint;cdecl;
345  PX_open_blob_file : function(pxdoc:Ppxblob_t; filename:pcchar):cint;cdecl;
346  PX_create_blob_fp : function(pxdoc:Ppxblob_t; fp:PFILE):cint;cdecl;
347  PX_create_blob_file : function(pxblob:Ppxblob_t; filename:pcchar):cint;cdecl;
348  PX_close_blob : procedure(pxdoc:Ppxblob_t);cdecl;
349  PX_delete_blob : procedure(pxblob:Ppxblob_t);cdecl;
350  PX_read_blobdata : function(pxblob:Ppxblob_t; data:pcchar; len:cint; _mod:pcint; blobsize:pcint):pcchar;cdecl;
351  PX_read_graphicdata : function(pxblob:Ppxblob_t; data:pcchar; len:cint; _mod:pcint; blobsize:pcint):pcchar;cdecl;
352  PX_read_grahicdata : function(pxblob:Ppxblob_t; data:pcchar; len:cint; _mod:pcint; blobsize:pcint):pcchar;cdecl;
353  PX_get_data_alpha : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:Ppcchar):cint;cdecl;
354  PX_get_data_bytes : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:Ppcchar):cint;cdecl;
355  PX_get_data_double : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:Pdouble):cint;cdecl;
356  PX_get_data_long : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pclong):cint;cdecl;
357  PX_get_data_short : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pcsshort):cint;cdecl;
358  PX_get_data_byte : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pcchar):cint;cdecl;
359  PX_get_data_bcd : function(pxdoc:Ppxdoc_t; data:pcuchar; len:cint; value:Ppcchar):cint;cdecl;
360  PX_get_data_blob : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; _mod:pcint; blobsize:pcint;
361    value:Ppcchar):cint;cdecl;
362  PX_get_data_graphic : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; _mod:pcint; blobsize:pcint;
363    value:Ppcchar):cint;cdecl;
364  PX_put_data_alpha : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pcchar);cdecl;
365  PX_put_data_bytes : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pcchar);cdecl;
366  PX_put_data_double : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:double);cdecl;
367  PX_put_data_long : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:cint);cdecl;
368  PX_put_data_short : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:csshort);cdecl;
369  PX_put_data_byte : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:cchar);cdecl;
370  PX_put_data_bcd : procedure(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pcchar);cdecl;
371  PX_put_data_blob : function(pxdoc:Ppxdoc_t; data:pcchar; len:cint; value:pcchar; valuelen:cint):cint;cdecl;
372{$ifndef windows}
373  PX_SdnToGregorian : procedure(sdn:clong; pYear:pcint; pMonth:pcint; pDay:pcint);cdecl;
374{$endif}
375  PX_GregorianToSdn : function(year:cint; month:cint; day:cint):clong;cdecl;
376  PX_make_time : function(pxdoc:Ppxdoc_t; hour:cint; minute:cint; second:cint):Ppxval_t;cdecl;
377  PX_make_date : function(pxdoc:Ppxdoc_t; year:cint; month:cint; day:cint):Ppxval_t;cdecl;
378  PX_make_timestamp : function(pxdoc:Ppxdoc_t; year:cint; month:cint; day:cint; hour:cint;
379    minute:cint; second:cint):Ppxval_t;cdecl;
380  PX_timestamp2string : function(pxdoc:Ppxdoc_t; value:double; format:pcchar):pcchar;cdecl;
381  PX_time2string : function(pxdoc:Ppxdoc_t; value:clong; format:pcchar):pcchar;cdecl;
382  PX_date2string : function(pxdoc:Ppxdoc_t; value:clong; format:pcchar):pcchar;cdecl;
383  PX_strdup : function(pxdoc:Ppxdoc_t; str:pcchar):pcchar;cdecl;
384
385procedure Freepxlib;
386Procedure Loadpxlib(lib : String);
387
388implementation
389
390uses
391  SysUtils, dynlibs;
392
393var
394  hlib : tlibhandle;
395
396Procedure Freepxlib;
397
398begin
399  if (HLib<>NilHandle) then
400    begin
401    FreeLibrary(hlib);
402    hlib:=Nilhandle;
403    end;
404  PX_get_majorversion:=nil;
405  PX_get_minorversion:=nil;
406  PX_get_subminorversion:=nil;
407  PX_has_recode_support:=nil;
408  PX_has_gsf_support:=nil;
409  PX_is_bigendian:=nil;
410  PX_get_builddate:=nil;
411  PX_boot:=nil;
412  PX_shutdown:=nil;
413  PX_new3:=nil;
414  PX_new2:=nil;
415  PX_new:=nil;
416  PX_open_fp:=nil;
417  PX_open_file:=nil;
418  PX_create_file:=nil;
419  PX_create_fp:=nil;
420  PX_get_opaque:=nil;
421  PX_write_primary_index:=nil;
422  PX_read_primary_index:=nil;
423  PX_add_primary_index:=nil;
424  PX_get_record:=nil;
425  PX_get_record2:=nil;
426  PX_put_recordn:=nil;
427  PX_put_record:=nil;
428  PX_insert_record:=nil;
429  PX_update_record:=nil;
430  PX_delete_record:=nil;
431  PX_retrieve_record:=nil;
432  PX_close:=nil;
433  PX_delete:=nil;
434  PX_pack:=nil;
435  PX_get_fields:=nil;
436  PX_get_field:=nil;
437  PX_get_num_fields:=nil;
438  PX_get_num_records:=nil;
439  PX_get_recordsize:=nil;
440  PX_set_parameter:=nil;
441  PX_get_parameter:=nil;
442  PX_set_value:=nil;
443  PX_get_value:=nil;
444  PX_set_targetencoding:=nil;
445  PX_set_inputencoding:=nil;
446  PX_set_tablename:=nil;
447  PX_set_blob_file:=nil;
448  PX_set_blob_fp:=nil;
449  PX_has_blob_file:=nil;
450  PX_new_blob:=nil;
451  PX_open_blob_fp:=nil;
452  PX_open_blob_file:=nil;
453  PX_create_blob_fp:=nil;
454  PX_create_blob_file:=nil;
455  PX_close_blob:=nil;
456  PX_delete_blob:=nil;
457  PX_read_blobdata:=nil;
458  PX_read_graphicdata:=nil;
459  PX_read_grahicdata:=nil;
460  PX_get_data_alpha:=nil;
461  PX_get_data_bytes:=nil;
462  PX_get_data_double:=nil;
463  PX_get_data_long:=nil;
464  PX_get_data_short:=nil;
465  PX_get_data_byte:=nil;
466  PX_get_data_bcd:=nil;
467  PX_get_data_blob:=nil;
468  PX_get_data_graphic:=nil;
469  PX_put_data_alpha:=nil;
470  PX_put_data_bytes:=nil;
471  PX_put_data_double:=nil;
472  PX_put_data_long:=nil;
473  PX_put_data_short:=nil;
474  PX_put_data_byte:=nil;
475  PX_put_data_bcd:=nil;
476  PX_put_data_blob:=nil;
477{$ifndef windows}
478  PX_SdnToGregorian:=nil;
479{$endif}
480  PX_GregorianToSdn:=nil;
481  PX_make_time:=nil;
482  PX_make_date:=nil;
483  PX_make_timestamp:=nil;
484  PX_timestamp2string:=nil;
485  PX_time2string:=nil;
486  PX_date2string:=nil;
487  PX_strdup:=nil;
488end;
489
490Procedure Loadpxlib(lib : String);
491
492begin
493  Freepxlib;
494  hlib:=LoadLibrary(Pchar(lib));
495  if hlib=0 then
496    raise Exception.Create(format('Could not load library: %s',[lib]));
497  pointer(PX_get_majorversion):=GetProcAddress(hlib,'PX_get_majorversion');
498  pointer(PX_get_minorversion):=GetProcAddress(hlib,'PX_get_minorversion');
499  pointer(PX_get_subminorversion):=GetProcAddress(hlib,'PX_get_subminorversion');
500  pointer(PX_has_recode_support):=GetProcAddress(hlib,'PX_has_recode_support');
501  pointer(PX_has_gsf_support):=GetProcAddress(hlib,'PX_has_gsf_support');
502  pointer(PX_is_bigendian):=GetProcAddress(hlib,'PX_is_bigendian');
503  pointer(PX_get_builddate):=GetProcAddress(hlib,'PX_get_builddate');
504  pointer(PX_boot):=GetProcAddress(hlib,'PX_boot');
505  pointer(PX_shutdown):=GetProcAddress(hlib,'PX_shutdown');
506  pointer(PX_new3):=GetProcAddress(hlib,'PX_new3');
507  pointer(PX_new2):=GetProcAddress(hlib,'PX_new2');
508  pointer(PX_new):=GetProcAddress(hlib,'PX_new');
509  pointer(PX_open_fp):=GetProcAddress(hlib,'PX_open_fp');
510  pointer(PX_open_file):=GetProcAddress(hlib,'PX_open_file');
511  pointer(PX_create_file):=GetProcAddress(hlib,'PX_create_file');
512  pointer(PX_create_fp):=GetProcAddress(hlib,'PX_create_fp');
513  pointer(PX_get_opaque):=GetProcAddress(hlib,'PX_get_opaque');
514  pointer(PX_write_primary_index):=GetProcAddress(hlib,'PX_write_primary_index');
515  pointer(PX_read_primary_index):=GetProcAddress(hlib,'PX_read_primary_index');
516  pointer(PX_add_primary_index):=GetProcAddress(hlib,'PX_add_primary_index');
517  pointer(PX_get_record):=GetProcAddress(hlib,'PX_get_record');
518  pointer(PX_get_record2):=GetProcAddress(hlib,'PX_get_record2');
519  pointer(PX_put_recordn):=GetProcAddress(hlib,'PX_put_recordn');
520  pointer(PX_put_record):=GetProcAddress(hlib,'PX_put_record');
521  pointer(PX_insert_record):=GetProcAddress(hlib,'PX_insert_record');
522  pointer(PX_update_record):=GetProcAddress(hlib,'PX_update_record');
523  pointer(PX_delete_record):=GetProcAddress(hlib,'PX_delete_record');
524  pointer(PX_retrieve_record):=GetProcAddress(hlib,'PX_retrieve_record');
525  pointer(PX_close):=GetProcAddress(hlib,'PX_close');
526  pointer(PX_delete):=GetProcAddress(hlib,'PX_delete');
527  pointer(PX_pack):=GetProcAddress(hlib,'PX_pack');
528  pointer(PX_get_fields):=GetProcAddress(hlib,'PX_get_fields');
529  pointer(PX_get_field):=GetProcAddress(hlib,'PX_get_field');
530  pointer(PX_get_num_fields):=GetProcAddress(hlib,'PX_get_num_fields');
531  pointer(PX_get_num_records):=GetProcAddress(hlib,'PX_get_num_records');
532  pointer(PX_get_recordsize):=GetProcAddress(hlib,'PX_get_recordsize');
533  pointer(PX_set_parameter):=GetProcAddress(hlib,'PX_set_parameter');
534  pointer(PX_get_parameter):=GetProcAddress(hlib,'PX_get_parameter');
535  pointer(PX_set_value):=GetProcAddress(hlib,'PX_set_value');
536  pointer(PX_get_value):=GetProcAddress(hlib,'PX_get_value');
537  pointer(PX_set_targetencoding):=GetProcAddress(hlib,'PX_set_targetencoding');
538  pointer(PX_set_inputencoding):=GetProcAddress(hlib,'PX_set_inputencoding');
539  pointer(PX_set_tablename):=GetProcAddress(hlib,'PX_set_tablename');
540  pointer(PX_set_blob_file):=GetProcAddress(hlib,'PX_set_blob_file');
541  pointer(PX_set_blob_fp):=GetProcAddress(hlib,'PX_set_blob_fp');
542  pointer(PX_has_blob_file):=GetProcAddress(hlib,'PX_has_blob_file');
543  pointer(PX_new_blob):=GetProcAddress(hlib,'PX_new_blob');
544  pointer(PX_open_blob_fp):=GetProcAddress(hlib,'PX_open_blob_fp');
545  pointer(PX_open_blob_file):=GetProcAddress(hlib,'PX_open_blob_file');
546  pointer(PX_create_blob_fp):=GetProcAddress(hlib,'PX_create_blob_fp');
547  pointer(PX_create_blob_file):=GetProcAddress(hlib,'PX_create_blob_file');
548  pointer(PX_close_blob):=GetProcAddress(hlib,'PX_close_blob');
549  pointer(PX_delete_blob):=GetProcAddress(hlib,'PX_delete_blob');
550  pointer(PX_read_blobdata):=GetProcAddress(hlib,'PX_read_blobdata');
551  pointer(PX_read_graphicdata):=GetProcAddress(hlib,'PX_read_graphicdata');
552  pointer(PX_read_grahicdata):=GetProcAddress(hlib,'PX_read_grahicdata');
553  pointer(PX_get_data_alpha):=GetProcAddress(hlib,'PX_get_data_alpha');
554  pointer(PX_get_data_bytes):=GetProcAddress(hlib,'PX_get_data_bytes');
555  pointer(PX_get_data_double):=GetProcAddress(hlib,'PX_get_data_double');
556  pointer(PX_get_data_long):=GetProcAddress(hlib,'PX_get_data_long');
557  pointer(PX_get_data_short):=GetProcAddress(hlib,'PX_get_data_short');
558  pointer(PX_get_data_byte):=GetProcAddress(hlib,'PX_get_data_byte');
559  pointer(PX_get_data_bcd):=GetProcAddress(hlib,'PX_get_data_bcd');
560  pointer(PX_get_data_blob):=GetProcAddress(hlib,'PX_get_data_blob');
561  pointer(PX_get_data_graphic):=GetProcAddress(hlib,'PX_get_data_graphic');
562  pointer(PX_put_data_alpha):=GetProcAddress(hlib,'PX_put_data_alpha');
563  pointer(PX_put_data_bytes):=GetProcAddress(hlib,'PX_put_data_bytes');
564  pointer(PX_put_data_double):=GetProcAddress(hlib,'PX_put_data_double');
565  pointer(PX_put_data_long):=GetProcAddress(hlib,'PX_put_data_long');
566  pointer(PX_put_data_short):=GetProcAddress(hlib,'PX_put_data_short');
567  pointer(PX_put_data_byte):=GetProcAddress(hlib,'PX_put_data_byte');
568  pointer(PX_put_data_bcd):=GetProcAddress(hlib,'PX_put_data_bcd');
569  pointer(PX_put_data_blob):=GetProcAddress(hlib,'PX_put_data_blob');
570{$ifndef windows}
571  pointer(PX_SdnToGregorian):=GetProcAddress(hlib,'PX_SdnToGregorian');
572{$endif windows}
573  pointer(PX_GregorianToSdn):=GetProcAddress(hlib,'PX_GregorianToSdn');
574  pointer(PX_make_time):=GetProcAddress(hlib,'PX_make_time');
575  pointer(PX_make_date):=GetProcAddress(hlib,'PX_make_date');
576  pointer(PX_make_timestamp):=GetProcAddress(hlib,'PX_make_timestamp');
577  pointer(PX_timestamp2string):=GetProcAddress(hlib,'PX_timestamp2string');
578  pointer(PX_time2string):=GetProcAddress(hlib,'PX_time2string');
579  pointer(PX_date2string):=GetProcAddress(hlib,'PX_date2string');
580  pointer(PX_strdup):=GetProcAddress(hlib,'PX_strdup');
581end;
582
583
584finalization
585  Freepxlib;
586end.
587