Is this possible with Madcodehook?

c++ / delphi package - dll injection and api hooking
Post Reply
aboka
Posts: 2
Joined: Fri Feb 25, 2005 4:21 am

Is this possible with Madcodehook?

Post by aboka »

Hi! I would like to ask is it possible to create something that would work with my VB6 that will 'inform' my VB6 app when Windows XP Shutdown or Reboot? It need to capture the exact event(0 = Shutdown, 1 = Reboot) and inform my VB6 app.

I have ask around and people says its possible using Madcodehook, but i got idea of howto - as im only a VB6 newbies :o

cheers,
uall
Posts: 254
Joined: Sun Feb 20, 2005 1:24 pm

Post by uall »

you have to create an global hook of
ExitWindowsEx -> look @ MSDN

this is the fucntion windows uses to shut down
for expample the explorer.exe calls this if u click on

"start" -> "shutdown" or what its called on english version of win

but i dont know if u are able to hook the call of windows shutdown in the taskmanger +ALT+STRG+DEL -> shutdown
Runner
Posts: 90
Joined: Tue Dec 14, 2004 1:04 pm

Post by Runner »

You would certainly catch all shutdown requests if you hooked NT....something function which executes the real shutdown code. But I don't know in which state the OS would be by then. Just an idea
aboka
Posts: 2
Joined: Fri Feb 25, 2005 4:21 am

Post by aboka »

Hi! Thanks for replying, but I would like to(if possible) find some expert here that could guide me into some example of how to go about it.

I have do some research and found this might be the closest to what I am looking for, but its in Delphi -
http://www.experts-exchange.com/Program ... 28549.html

Could someone help me to find something in VB6?

cheers,
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Well, in that link you have all the (Delphi) source code you need. What more can we do for you?

You can't write the hook dll in VB, you *have* to use Delphi or C++ for that. Maybe you can do the application part of it in VB, but not the hook dll stuff.
Post Reply