Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jul : Block a process by its module name
| Subject: | Block a process by its module name |
| Posted by: | "anithegregorian" (anithegregori..@hotmail.com) |
| Date: | Wed, 2 Jul 2008 22:18:50 +0530 |
Hi everyone,
I think im posting this query in the right newgroups.
I was thinking if it was possible in Delphi to block a particular
process by its module name from being executed? like for eg.
c:\program files\mozilla\firefox.exe -> if i say to block this process
then can I block this process whenever the application sees that its
trying to load itself into the memory.
I know that this is an EXPERT level query and which is quite hard to
answer, but thats the point of having a community driven approach to
solving problems :) Since I want the app to trace the opening of the
process before it gets fully loaded into the memory, as far as my
knowledge goes I believe that I have to set a hook on CreateProcess API
trace the process name and if not permitted then terminate it. I have
seen one such library called madCodeHook which allows you to do just
what Im trying to say above. But before I do anything silly I need some
community opinions and suggestions over this.
Thanks & Regards,