title: Delphi DLL Dynamic Error raise to many consecutive exception
body: <p>I found this source code from a Delphi sample codes, and
  I am adding a control or component inside a Delphi dynamic DLL, I can't figure it out,</p>
  
  <pre><code>library DLLEntryLib;
  
  uses
    SysUtils,
    Windows,
    Dialogs,
    Classes,
    msHTML,
    SHDocVw;
  
  type
  TMyWeb = class(TWebBrowser)
  constructor create(Aowner: TComponent); override;
  end;
  
  var
  web: TMyWeb;
  
  // Initialize properties here
  constructor TMyWeb.Create(AOwner: TComponent);
  begin
  inherited Create(Self);
  end;
  
  procedure getweb;
  begin
      web := TmyWeb.create(nil);
      web.Navigate('http://mywebsite.com');
  end;
  
  
  procedure xDLLEntryPoint(dwReason: DWord);
  begin
    case dwReason of
      DLL_PROCESS_ATTACH:
      begin
      getweb; //I THINK THE ERROR IS HERE, HOW TO WORK THIS OUT?
      ShowMessage('Attaching to process');
      end;
      DLL_PROCESS_DETACH: ShowMessage('Detaching from process');
      DLL_THREAD_ATTACH:  MessageBeep(0);
      DLL_THREAD_DETACH:  MessageBeep(0);
    end;
  end;
  
  begin
    { First, assign the procedure to the DLLProc variable }
    DllProc := @xDLLEntryPoint;
    { Now invoke the procedure to reflect that the DLL is attaching to the
      process }
    xDLLEntryPoint(DLL_PROCESS_ATTACH);
  end.
  
  
  //IN MY APPLICATION FORM.
  procedure TMainForm.btnLoadLibClick(Sender: TObject);
  begin
  if LibHandle = 0 then
  begin
  LibHandle := LoadLibrary('DLLENTRYLIB.DLL');
  if LibHandle = 0 then
    raise Exception.Create('Unable to Load DLL');
  end
  else
  MessageDlg('Library already loaded', mtWarning, [mbok], 0);
  end;
  </code></pre>
  
  <p>How do I get rid of the error?
  raise to many consicutive exception</p>