How to Hide a Process
Processes can be hidden in both Windows (from the Ctrl+alt+delete menu) and Linux (from ps and top).
In windows:
Programs listed as services are not shown up.
Example Borland c code:
//--------------HiddenApp.cpp--------------
#include
#pragma hdrstop
USERES("HiddenApp.res");
USEFORM("Unit1.cpp",Form1);
typedef DWORD (WINAPI *TRegisterServiceProcess)(DWORD,DWORD);
bool registered=false;
//-----------------------------------------------------------------------
void __fastcall reg(bool which) //true=register, false=unregister
{
HMODULE hmod;
TRegisterServiceProcess pReg;
hmod = LoadLibrary("kernel32.dll");
if (!hmod) return;
(FARPROC)pReg = (FARPROC)::GetProcAddress(hmod,"RegisterServiceProcess");
if (!pReg) {FreeLibrary(hmod); return;}
else
{
if (which)
pReg(0,1); //unregister our process
else
pReg(0,0);
}
registered = true;
FreeLibrary(hmod);
}
//-----------------------------------------------------------------------
WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
try
{
reg(true);
Application->Initialize();
Application->CreateForm(__classid(TForm1), &Form1;);
Application->Run();
}
catch (Exception &exception;)
{
Application->ShowException(&exception;);
}
if (registered) reg(false);
return 0;
}
//--------------eof--------------------------------------------------------
Example delphi code: