Use checkup of executed processes ->Terminate if hidden process found.
How can I clear the clipboard when closing the program?
(So that the user cannot paste the data copied from the protected program window after closing it into another program.)
Maybe there is a plugin?
In this case, the option Checkup - Executed Process - Terminate application should be disabled (together with the message).
I'm an amateur, I'm trying to improve, if possible, see if I'm doing the right thing
(it is possible in the PM or by mail (I am an official user)
Code: Select all
unit test_Clipboard; uses Windows, Clipbrd, enigma_ide; function Enigma_Plugin_About : PWideChar; begin Enigma_Plugin_About := 'Enigma Clipboard Clear&Terminate Apps if present process notepad'; end; function Enigma_Plugin_Description : PWideChar; begin Enigma_Plugin_Description := 'Enigma Clipboard Clear&Terminate Apps if present process notepad'; end; procedure Enigma_Plugin_OnInit; function EP_CheckupFindProcess : PAnsiChar; begin if EP_CheckupFindProcess (FileName('Notepad.exe'),(WindowText('Notepad'))) then begin if OpenClipboard(0) then try EmptyClipboard; finally CloseClipboard; end else begin TerminateProcess(DWORD(-1), 0) end; end; exports Enigma_Plugin_About, Enigma_Plugin_Description, Enigma_Plugin_OnInit, begin end.
thanks!This looks ok, if it fits your needs.
q- "uses enigma_ide"
- no need to specify the path to enigma_ide.pas ?
q2 - " if EP_CheckupFindProcess (FileName('Notepad.exe'),(WindowText('Notepad'))) then"
- how it works - (FileName('Notepad.exe') OR (WindowText('Notepad') /(FileName('Notepad.exe') AND (WindowText('Notepad') ? No need to specify here "IS", "CONTAINS" ?
q3 - how do I specify the frequency of the process detection check? (2s, 5s etc) ?
q4 - attach
Sorry for the possibly lamers questions
- option3.jpg (208.4 KiB) Viewed 26107 times
You can just take it from EnigmaSDK folder and add to your Delphi project.
If both parameters are specified, it works as AND. If you need to simulate OR, then call EP_CheckupFindProcess two times with either file name, either WindowText.
"IS", "CONTAINS" can be specified in the function EP_CheckupFindProcessEx, I recommend to use it since it is more smart. EP_CheckupFindProcess is kept for compatibility with old versions.
Create a thread in plugin and check the thread execution time (or just delay it in 2s, 5s etc). Check sources of other plugins in Enigma, some of them are using thread also.
Unfortunately no, because this option is useful for you only, it will over-complicate interface. Moreover, it can be easy done through plugin.
it can be easy done through plugin.
Of course it's easy for you
I tried to compile a test project - an error...
Can you tell me what my mistake is?
- failed.jpg (379.78 KiB) Viewed 26076 times
Function EP_CheckupFindProcess should receive 3 parameters. When I said that you need to pass just FileName this means that other parameters should be empty, but they have to exists. Like that:
EP_CheckupFindProcess(FileName, nil, nil);
EP_CheckupFindProcess(nil, WindowsText, nil);
EP_CheckupFindProcess(nil, nil, WindowsClass);
But again, better to use EP_CheckupFindProcessEx function.