Thanks Ralf, that seems to be more stable - the process is not crashing anymore (ran it twice, no errors).
Pardon my ignorance - I am still using cdecl, how can I use 'register'? Doesn't sqlite expects cdecl? jp --- Ralf Junker <[EMAIL PROTECTED]> wrote: > Hello jp, > > with DISQLite3, I use the the following colation > callback function without problems: > > function SQLite3_Compare_System_NoCase_Ansi( > UserData: Pointer; > l1: Integer; const s1: Pointer; > l2: Integer; const s2: Pointer): Integer; > begin > Result := CompareStringA(LOCALE_SYSTEM_DEFAULT, > NORM_IGNORECASE, s1, l1, s2, l2) - 2; > end; > > This function should be functionally equivalent to > your implementation, but accesses the Win32 API > directly. Also, it does not implicitly convert the > PChar pointers to AnsiStrings like your call > "copy(B,1,lenB);" implicitly does. > > Notes: > > * The above function is not declared as "cdecl" > because DISQLite3 uses the faster "register" calling > convention instead. > > * The above function (just as yours) does not treat > UTF-8 sequences properly. You might want to consider > a WideString function instead, depending on the data > you are processing. > > Regards, > > Ralf > ____________________________________________________________________________________ Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

