All pastes #24455 Raw Edit

Anonymous

public text v1 · immutable
#24455 ·published 2005-10-02 18:35 UTC
rendered paste body
unit modFunctions;

interface

uses
  SysUtils, DateUtils, Windows, Registry, Forms;

type
  TExplodeArray = array of String;

function AppPath : string;
function ETime : string;
function FormatList : TExplodeArray; stdcall; external 'core.dll';
function ShowList : TExplodeArray; stdcall; external 'core.dll';
function FormatFN(strTitle:PChar) : PChar; stdcall; external 'core.dll';
function DetectBT : PChar; stdcall; external 'core.dll';

//type
//  TDetectBT = function: PChar; stdcall;

implementation

//function DetectBT : string;
//var
//  hDll: cardinal;
//  xDetectBT: TDetectBT;
//begin
//  result := '';
//  hDll := LoadLibrary('core.dll');
//  if hDll <> 0 then begin
//    @xDetectBT := GetProcAddress(hDll, 'DetectBT');
//    if Assigned(@xDetectBT) then
//      result := xDetectBT;
//    FreeLibrary(hDll);
//  end;
//end;

function AppPath : string;
begin
  result := ExtractFilePath(Application.ExeName);
  result := Copy(result,1,Length(result)-1);
end;

function ETime : string;
begin
  result := '['+FormatDateTime('hh:nn:ss',Now)+']';
end;

end.