Windows Hook
-
Hi Guys I want to prevent my app getting terminated by the taskmanager. I saw some examples but they are using dlls that you have to pay for. So I informed myself a bit about that. I figured out that i've to use SetWindowHookEx. And there we are at my first problem: What type of Hook should i use ? i prefered WH_CALLWNDPROC. And how do i have to realize the main loop ? Is it a function that i get with the hook ? I'm never used hooks before, but i'm sure with some help i could do it. MFG RedDragon P.S.: The code will never be used to cause any damage to hard- or software. I'm working on a program which controls pupil pc's. Unix and C are the ultimate computer viruses.
-
Hi Guys I want to prevent my app getting terminated by the taskmanager. I saw some examples but they are using dlls that you have to pay for. So I informed myself a bit about that. I figured out that i've to use SetWindowHookEx. And there we are at my first problem: What type of Hook should i use ? i prefered WH_CALLWNDPROC. And how do i have to realize the main loop ? Is it a function that i get with the hook ? I'm never used hooks before, but i'm sure with some help i could do it. MFG RedDragon P.S.: The code will never be used to cause any damage to hard- or software. I'm working on a program which controls pupil pc's. Unix and C are the ultimate computer viruses.
You can't, the user is ultimately in control of the computer. If what you want were possible, viruses could do the same thing. See The arms race between programs and users[^] and Why can't you trap TerminateProcess?[^] --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
-
You can't, the user is ultimately in control of the computer. If what you want were possible, viruses could do the same thing. See The arms race between programs and users[^] and Why can't you trap TerminateProcess?[^] --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
Yeah i see. I read this articles, too. But it is POSSIBLE. A programmer already done so. You can find the demo app on: http://www.madexcept.com/ under c++ and then go to MadCodeHook. Yeah you can come with this argument: Why don't you even this code ? Well, how could i get better when i just copy or use dlls from others ? MFG RedDragon P.S: Excuse my bad english Unix and C are the ultimate computer viruses.
Visit me: www.programming.info.ms -
Yeah i see. I read this articles, too. But it is POSSIBLE. A programmer already done so. You can find the demo app on: http://www.madexcept.com/ under c++ and then go to MadCodeHook. Yeah you can come with this argument: Why don't you even this code ? Well, how could i get better when i just copy or use dlls from others ? MFG RedDragon P.S: Excuse my bad english Unix and C are the ultimate computer viruses.
Visit me: www.programming.info.ms -
Hi Guys I want to prevent my app getting terminated by the taskmanager. I saw some examples but they are using dlls that you have to pay for. So I informed myself a bit about that. I figured out that i've to use SetWindowHookEx. And there we are at my first problem: What type of Hook should i use ? i prefered WH_CALLWNDPROC. And how do i have to realize the main loop ? Is it a function that i get with the hook ? I'm never used hooks before, but i'm sure with some help i could do it. MFG RedDragon P.S.: The code will never be used to cause any damage to hard- or software. I'm working on a program which controls pupil pc's. Unix and C are the ultimate computer viruses.
RedDragon2k wrote: I'm working on a program which controls pupil pc's. Have the students using accounts that do not have permission to terminate your process (which can be run under a different account). Just about anything else is dodgy as hell, and will eventually be broken by any student worth his salt.
"The time has come," the Walrus said, "To talk of many things..."