Solved

Hiding a Proccess

Posted on 2004-03-26
6
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 92
Run video youtube webbrowse 10 73
Dynamically Created Query 3 70
Firemonkey how to swip panel with finger tap 1 20
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…

749 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