Unsolved QT dll and winapi
-
Hi,
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?
-
Hi,
Something I do not get, how is that dll supposed to be injected in your other processes ?
-
@SGaist I don't understand you question, so I show you my code :) I ask about that in other forum:
https://stackoverflow.com/questions/63113636/how-to-set-global-hook-wh-cbt-in-winapi
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 ?