unit ultsGeneral; {$mode objfpc}{$H+} interface uses Classes, SysUtils, ultsTypes; function ltsInitialize: TltsErrorCode; stdcall; function ltsGetLastErrorCode: TltsErrorCode; stdcall; function ltsGetLastErrorMsg: PAnsiChar; stdcall; function ltsFinalize: TltsErrorCode; stdcall; implementation uses ultsUtils; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //General/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function ltsInitialize: TltsErrorCode; stdcall; begin try result := ltsErrNone; Initialize; except on ex: Exception do begin SetLastError(ex); result := LastErrorCode; end; end; end; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function ltsGetLastErrorCode: TltsErrorCode; stdcall; begin result := LastErrorCode; end; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function ltsGetLastErrorMsg: PAnsiChar; stdcall; begin result := PAnsiChar(LastErrorMsg); end; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function ltsFinalize: TltsErrorCode; stdcall; begin try Finalize; result := ltsErrNone; except on ex: Exception do begin SetLastError(ex); result := LastErrorCode; end; end; end; end.