Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT dll and winapi
TomNow99 last edited by TomNow99
OS: Win 10
I created dll using QT. In this dll I have 4 functions:
- hook(), where I have only one command: SetWindowsHookEx()
- unhook(), where I have only one command: UnhookWindowsHookEx()
- DllMain(), where I don't have many interesting things, only set variables :)
- callback function with hook code
I created example.exe app, where I get this dll and execute functions hook() and unhook(). My goal is to have global WH_CBT hook. In callback function in dll i have write to file on Desktop text with the name of App, which go to this callback function to check is that hook is really global. When I run my QT apps, which I wrote and run them ( from qt creator or from desktop ) I see that apps are infected by dll. Perfect. But when I run other apps I don't see their names. I tried run for example Oracle Virtual Box. My dll is 64 bits and Oracle VB is 64 bits, so my dll should infected VB too. Why this doesn't work? Maybe because of that dll is created by QT?
MalitheBIG Banned last edited by
This post is deleted!
Something I do not get, how is that dll supposed to be injected in your other processes ?
TomNow99 last edited by
@SGaist I don't understand you question, so I show you my code :) I ask about that in other forum:
When the fourth arg in SetWindowsHookEx will be 0, my dll should be ijected to other processes.
Does it work if you do not use any Qt code in your .dll ?