Solved

Hiding a Proccess

Posted on 2004-03-26
6
209 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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