Solved

Hiding a Proccess

Posted on 2004-03-26
6
207 Views
Last Modified: 2010-04-05
Dear Masters

I want to know that how i can hide a proccess in Windows XP in "Windows Task Manager" Window, also when the user terminates a proccess our program can detect it if or not.in other words is there an event when a proccess is being terminated, i have tested WM_DESTROY and WM_NCDESTROY, none of them work!!!

thank you in advance for your information
Sincirely Yours
Milad
0
Comment
Question by:miladyyy
  • 2
6 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 25 total points
ID: 10693906
It should hide it
procedure TForm1.FormCreate(Sender: TObject);
var
  h: HWND;
begin
  h := Application.Handle;
  SetWindowLong(h, GWL_EXSTYLE,GetWindowLong(h, GWL_EXSTYLE) or            WS_EX_TOOLWINDOW);
end;
0
 
LVL 17

Expert Comment

by:mokule
ID: 10693927
May be this helps something, but it is not fired when terminating from task manager.

In the main application Form
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  CanClose := (Application.MessageBox(PChar('Terminate?'),PChar('Decide'),MB_YESNO) = IDYES);
end;

0
 
LVL 14

Assisted Solution

by:DragonSlayer
DragonSlayer earned 25 total points
ID: 10697717
goto www.madshi.net and check out madshi's example on API hooking... it will show how to make it so that your process can't be terminated via TerminateProcess
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now