Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Program not in task list

Posted on 1997-11-14
8
Medium Priority
?
151 Views
Last Modified: 2010-04-04
Hello people,

is it possible to create a delphi 3 program, wich doesn't appear in the tasklist when ctrl-alt-del is pressed. ?

Thanx
0
Comment
Question by:mories
  • 4
  • 3
8 Comments
 

Expert Comment

by:almiller
ID: 1350396
No. Every thing running under windows is displayed in the task list, even windows' programs it self, such as the Explorer, and systray etc...

A program not displayed int he task list, would have to not be registered under windows.
0
 
LVL 7

Expert Comment

by:ahalya
ID: 1350397
btw, What constitutes a "tasklist" ?

if you're referring to the list obtained by pressing [ctrl][alt][del] then you CAN hide an app from that list.

0
 
LVL 1

Author Comment

by:mories
ID: 1350398
yes i do mean that list,

how can i hide it ??
0
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!

 
LVL 7

Accepted Solution

by:
ahalya earned 400 total points
ID: 1350399
Hi Mories,
i'm surprised that you have classified this as an "easy" question :-). Anyway, here goes the answer.

you do that by calling the "RegisterServiceProcess" function in Kernel32 DLL.

function declaration goes like this:
(put it just after 'implementation')

function RegisterServiceProcess (ThreadID : THandle; Flags : Integer): Integer; stdcall; external kernel32 name 'RegisterServiceProcess';

in your form create event call the function like this:

ok := RegisterServiceProcess (0, 1);
if ok  = 0 then ShowMessage ('Error Hiding from task list')

0
 
LVL 1

Author Comment

by:mories
ID: 1350400
Adjusted points to 100
0
 
LVL 7

Expert Comment

by:ahalya
ID: 1350401
Hi Mories,

you didn't have to adjust the points :-)
i'm not getting anything out of this !

anyway enjoy delphi !

0
 
LVL 1

Author Comment

by:mories
ID: 1350402
i think it was worth it.

i needed this one..

Thanx
0
 
LVL 7

Expert Comment

by:ahalya
ID: 1350403
since you're being nice, here is some more info:


you can call RegisterServiceProcess with a parameter of 0 the remove it from being a service. for e.g.
you can do

RegisterServiceProcess (0, 1) to hide from the task list and
RegisterServiceProcess (0, 0) to show your program again in the task list.

the first parameter indicates the handle of the process; (0 indicates the calling process)





0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline

773 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