Hide process from Win2k.

dum_dum
dum_dum used Ask the Experts™
on
Hi Guys,

I'm finding a example of how to hide a process from task manager. Someone know how to do it in Win2k ??

Thkz a lot.

Best Regards.

[ ]'s
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
up
Commented:
Here is an example to hide the process (its in delphi, but a Borland C Code version is available:

http://www.groovyweb.uklinux.net/index.php?page_name=how%20to%20hide%20a%20process

--- Start of Code ---
unit Unit1;

Interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    StdCtrls;

type
  TForm1 = class (TForm)
    Button1 : TButton;
    procedure FormDestroy (Sender: TObject);
    procedure FormCreate (Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1 : TForm1;

implementation

{$R *.DFM}

const
  RSPSIMPLESERVICE     = 1;
  RSPUNREGISTERSERVICE = 0;

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

procedure TForm1.FormDestroy (Sender: TObject);
begin
  RegisterServiceProcess (GetCurrentProcessID, RSPUNREGISTERSERVICE)
end;


procedure TForm1.FormCreate (Sender: TObject);
begin
  RegisterServiceProcess (GetCurrentProcessID, RSPSIMPLESERVICE)
end;


end.
---End of Code---

I hope this helps.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Recommendation: Accept comment from pnh73

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

DominicCronin
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial