Board index » delphi » How can I hide process in task list.

How can I hide process in task list.

With all know to hide process in task list using RegisterServiceProcess
function in kernel32.dll.
But,When I wrote code like "RegisterServiceProcess(GetCurrentProcessID(),1)"
in "formcreate" event.It nothing had happened.
I already register the function
RegisterServiceProcess(processid,flag:DWORD).
My compiler is Delphi 4.
 

Re:How can I hide process in task list.


Add the following function to your project:

function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer;
         stdcall; external 'KERNEL32.DLL';

Then you can call it like this:

RegisterServiceProcess(GetCurrentProcessID, 1); // To hide

or

RegisterServiceProcess(GetCurrentProcessID, 0); // To not hide

Good luck!

Ed

Quote
On Tue, 3 Oct 2000 16:05:58 +0800, "lcstudio" <lcstu...@china.com> wrote:
>With all know to hide process in task list using RegisterServiceProcess
>function in kernel32.dll.
>But,When I wrote code like "RegisterServiceProcess(GetCurrentProcessID(),1)"
>in "formcreate" event.It nothing had happened.
>I already register the function
>RegisterServiceProcess(processid,flag:DWORD).
>My compiler is Delphi 4.

Re:How can I hide process in task list.


Quote
Ed Hammer wrote in message ...
>Add the following function to your project:

>function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer;
>         stdcall; external 'KERNEL32.DLL';

Successed on you help.
Thanx for lot!
I think i have mistake on loss keyword "stdcall".

Other Threads