library libupload;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  windows,
  SysUtils,
  Classes,
  Ufrmmain in 'Ufrmmain.pas' {frmmain},
  Ufunction in 'Ufunction.pas',
  Umain_hlp in 'Umain_hlp.pas';

{$R *.res}

procedure proc_imageshack_upload(strlist:tstringlist); export; stdcall;
var
  frmmain:Tfrmmain;
begin
  frmmain:=Tfrmmain.Create(nil);
  try
    frmmain.strlist:=strlist;
    frmmain.ShowModal;
  finally
    frmmain.Free;
  end;
end;

procedure MyDLLProc(Reason: Integer); register;
begin
  case Reason of
    DLL_PROCESS_DETACH:begin
    end;
  end;
end;

exports
   proc_imageshack_upload;

begin
  randomize;
  DLLProc := @MyDLLProc;

end.
