Page 1 of 1

Help a beginner

Posted: Tue Jan 03, 2017 9:09 am
by rowger
Hi everybody and a happy new year!

I would like to use a hook on wtsapi32.dll, specifically the WTSQuerySessionInformationA Call.

However, I am a complete beginner at hooking and C++

I would be very grateful is you have the code to a similar project that you can provide me with.

Thanks.

Re: Help a beginner

Posted: Tue Jan 03, 2017 1:31 pm
by madshi
Your best bet is always to take one of the demo projects as the starting point for your own hook project, and then just change the hook dll source code. E.g. try the HookProcessCreation demo, and simply replace the CreateProcess etc API hooks with an WTSQuerySessionInformationA hook. It shouldn't be very hard to do. Just be very careful to make sure that both the hook callback function and the "next" function variable definition have the exactly correct list of parameters, calling convention and return type.

Re: Help a beginner

Posted: Tue Jan 03, 2017 2:53 pm
by rowger
I can't seem to be able to find the Demo Folder, can you please point me to it?
Thanks for bearing with me.

Re: Help a beginner

Posted: Tue Jan 03, 2017 3:10 pm
by madshi
Should be "madCollection installation root\madCodeHook\Demos".