Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program FraudPreventionMonitor;
- uses
- Windows, Messages,
- uCommon;
- var
- monitor: TMonitor;
- procedure ProcessMessages;
- var
- msg: TMsg;
- begin
- While PeekMessage(msg, 0, 0, 0, PM_REMOVE) Do
- Begin
- TranslateMessage(msg);
- DispatchMessage(msg);
- if msg.message = WM_QUERYENDSESSION then
- begin
- monitor.Active := FALSE;
- Break;
- end;
- End;
- end;
- begin
- if not TInstanceController.IsAlphaInstance then
- Exit;
- TInstanceController.RegisterInstance;
- monitor := TMonitor.Create;
- monitor.Start;
- while monitor.Active do
- begin
- ProcessMessages;
- Sleep(10);
- end;
- monitor.Stop;
- monitor.Free;
- end.
Add Comment
Please, Sign In to add comment