Example

Patch in unit Controls

procedure DoneControls;
begin
  // Application.Free; Don't free it, because it is not yours
  Application := nil;
   // Screen.Free;
  Screen := nil;
  // Mouse.Free;
  Mouse := nil;
  CanvasList.Free;
  GlobalDeleteAtom(ControlAtom);
  GlobalDeleteAtom(WindowAtom);
  if IMM32DLL <> 0 then FreeLibrary(IMM32DLL);
end;

initialization
  NewStyleControls := Lo(GetVersion) >= 4;
//  InitControls;  Don't call InitControls

finalization
  DockSiteList.Free;
  DoneControls;

The code of your library:
Library Project1;

Uses
  Controls,
  Forms,
  SysUtils,
  Classes;

{$R *.RES}

{Call this procedure from your exe first}
Procedure InitControls(AApplication : TApplication; AScreen : TScreen;
AMouse : TMouse);
Begin
  Application := AApplication;
  Screen := AScreen;
  Mouse := AMouse;
End;

Exports InitControls;

Begin
End.