问题
I am currently working on a program that extract text messages from a third party program, so I dont have to enter tooltip text manually in my excel sheets. I am using dll injection for this and have already successfully hooked the microsoft's textoutw function. The program also gives me the messages I want. So the hook was successful.
Now, I want to put some "cloths" (a GUI) on my program and have decided to go with Qt. So I designed a GUI and have put my dll engine into the GUI.
After I have done this, I tried out my program, but now the program does not hook anymore. The dll hook code and everything else are exactly the same, except they are in a qt environment now.
I suspected an unicode/multibyte problem, but after I have set my original "non-qt" code to unicode and reinserted that piece of code into the Qt project, I still does not work.
I have done some research in the internet, an interesting source said that I have to use qwidget::winId, however I have tried this and still nothing works.
There is no error message, no console output whatsoever...
I am kinda stuck at this problem for hours now... hope you guys can help me!
Jonathan
来源:https://stackoverflow.com/questions/23057615/why-does-qt-not-work-with-dll-injection