Greetings, I've loaded a function manually from a dll using GetProcAddress, the function worked when I called the handle to it, but my problem is, when I tried to obtain the return value by accessing eax, it seemed to be not in eax because my program crashed... did I just miscoded something because the return value is really in eax, or the return value is in somewhere else? I would appreciate any help
Posted on 2001-02-26 08:12:00 by JoseVelarde
It depends on the function you call :). But 99% of the time, return value is in the EAX register. Could you perhaps post the little snippet of code that faults? Ie, your GetProcAddress, call to function, and the few lines of code right after?
Posted on 2001-02-26 08:15:00 by f0dder
Generally, I'm not too concerned with proc return values if my program has just crashed. FIX THAT CRASH, then worry about it. My first guess would be you don't have the correct proc prototype, or you are sending incorrect params. If the dll doesn't check what you sent it, the latter could crash it. And it has zero ways of getting a param count of what you sent, so if that is wrong your stack blows up.
Posted on 2001-02-26 11:01:00 by Ernie