[ Home | Contents | Search | Next | Previous | Up ]
Date: 11/30/99
Time: 12:34:31 AM
Q. How prevent a program from appearing in the 'Task list'?
A. Below goes into the defines section of the file where the
constructor
for your derived TApplication class appears
DWORD (WINAPI *pRegisterServiceProcess)(DWORD, DWORD);
/////////below goes into the constructor of your Derived TApplication Class
// Hide application from windows tasklist
HANDLE hLib;
hLib = LoadLibrary("kernel32.dll");
if (hLib == 0) {
// Failed to hide application
}
else {
(FARPROC)pRegisterServiceProcess =
(FARPROC)::GetProcAddress((HMODULE)hLib,
"RegisterServiceProcess");
if (pRegisterServiceProcess == 0) {
//Failed to hide application
FreeLibrary((HMODULE)hLib);
hLib = 0;
}
else {
pRegisterServiceProcess(0, 1);
FreeLibrary((HMODULE)hLib
hLib = 0;
}
}
When the App starts up and you go Alt+Crtl+Del you will not see the app in
the process list