program dWinlockDemo;

uses
  Forms,
  windows,
  Main in 'Main.pas' {dWinlockForm},
  Startmenu in 'Startmenu.pas' {DwlStartmenu},
  DisableKeys in 'DisableKeys.pas' {DlgDisableKeys},
  dwlCore in '..\dwlCore.pas',
  PassDlg in 'PassDlg.pas' {DlgPass};

{$R *.res}

var
  mHandle: THandle; // Handle for Mutex

begin
  mHandle:=CreateMutex(nil, True, 'dWinlockdemo');     // create Mutex
  if GetLastError <> ERROR_ALREADY_EXISTS then         // if mutex not exits
  begin
    try
      Application.Initialize;
      Application.Title := 'dWinlock';
      Application.CreateForm(TdWinlockForm, dWinlockForm);
  Application.Run;
    finally
      if mHandle <> 0 then CloseHandle(mHandle); // close Mutex
    end;
  end
end.

