Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hiding a Proccess

Posted on 2004-03-26
6
Medium Priority
?
215 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 100 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 100 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

705 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