Why does Qt not work with dll injection?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 08:47:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!