Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: YASAQ Yet another silly academic question - how does "code optimization" really works? Pin
Vaclav_17-Jan-15 3:33
Vaclav_17-Jan-15 3:33 
GeneralRe: YASAQ Yet another silly academic question - how does "code optimization" really works? Pin
Richard MacCutchan17-Jan-15 5:49
mveRichard MacCutchan17-Jan-15 5:49 
GeneralRe: YASAQ Yet another silly academic question - how does "code optimization" really works? Pin
jschell18-Jan-15 6:38
jschell18-Jan-15 6:38 
GeneralRe: YASAQ Yet another silly academic question - how does "code optimization" really works? Pin
Mike Nordell2-Feb-15 10:31
Mike Nordell2-Feb-15 10:31 
QuestionDetours : how to hook QT applications ? Pin
jeff614-Jan-15 23:56
jeff614-Jan-15 23:56 
AnswerRe: Detours : how to hook QT applications ? Pin
Daniel Pfeffer15-Jan-15 0:25
professionalDaniel Pfeffer15-Jan-15 0:25 
GeneralRe: Detours : how to hook QT applications ? Pin
jeff615-Jan-15 0:46
jeff615-Jan-15 0:46 
GeneralRe: Detours : how to hook QT applications ? Pin
Daniel Pfeffer15-Jan-15 2:17
professionalDaniel Pfeffer15-Jan-15 2:17 
I stand by the points that I made in my first reply. You must either statically link with the Qt DLL (and can then extract a pointer to the method) or dynamically load the Qt DLL (and use GetProcAddress() with the mangled method name).

IIRC, the source code for Qt is available for download. An examination of the make file would give you the compiler and compiler options used, which would give you the calling convention and the mangled name for the C++ method. You may then write a class that uses the same calling conventions, and contains a method with the same signature as the method that you wish to intercept. This should get you close enough to working code that debugging would be feasible. For example:

C++
class QT_API MyQPushButton
{
public:
    bool event( void* data )
    {
        // your code goes here
    }
};

GeneralRe: Detours : how to hook QT applications ? Pin
jeff617-Jan-15 6:14
jeff617-Jan-15 6:14 
GeneralRe: Detours : how to hook QT applications ? Pin
Andy You15-May-22 2:41
Andy You15-May-22 2:41 
QuestionChange scrollbar style Pin
_Flaviu14-Jan-15 9:05
_Flaviu14-Jan-15 9:05 
AnswerRe: Change scrollbar style Pin
CPallini14-Jan-15 10:07
mveCPallini14-Jan-15 10:07 
GeneralRe: Change scrollbar style Pin
jeron114-Jan-15 10:24
jeron114-Jan-15 10:24 
GeneralRe: Change scrollbar style Pin
enhzflep14-Jan-15 14:10
enhzflep14-Jan-15 14:10 
GeneralRe: Change scrollbar style Pin
_Flaviu14-Jan-15 20:16
_Flaviu14-Jan-15 20:16 
QuestionBest way to get a program to send emails Pin
Anorexic Tribble11-Jan-15 11:44
Anorexic Tribble11-Jan-15 11:44 
AnswerRe: Best way to get a program to send emails Pin
Richard Andrew x6411-Jan-15 12:09
professionalRichard Andrew x6411-Jan-15 12:09 
AnswerRe: Best way to get a program to send emails Pin
CPallini11-Jan-15 21:48
mveCPallini11-Jan-15 21:48 
GeneralRe: Best way to get a program to send emails Pin
Anorexic Tribble12-Jan-15 3:48
Anorexic Tribble12-Jan-15 3:48 
GeneralRe: Best way to get a program to send emails Pin
enhzflep12-Jan-15 4:24
enhzflep12-Jan-15 4:24 
JokeRe: Best way to get a program to send emails Pin
jeron112-Jan-15 4:55
jeron112-Jan-15 4:55 
GeneralRe: Best way to get a program to send emails Pin
enhzflep12-Jan-15 4:59
enhzflep12-Jan-15 4:59 
GeneralRe: Best way to get a program to send emails Pin
David Crow12-Jan-15 5:12
David Crow12-Jan-15 5:12 
GeneralRe: Best way to get a program to send emails Pin
enhzflep13-Jan-15 9:01
enhzflep13-Jan-15 9:01 
GeneralRe: Best way to get a program to send emails Pin
CPallini12-Jan-15 5:04
mveCPallini12-Jan-15 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.