Debug a C DLL

J

Jake Thompson

Hello,

I have an exe that calls a dll. The dll is dynamically loaded and I
use getprocaddress to get the address of the funciton I want to call.

Everything seems to work fine in debug mode but in release mode it is
blowing up at the first call to the dll. Does anybody have any advice
on how to narrow down the problem. I put popups into the exe code to
narrow down the issue to the first dll call but I am at a loss as to
what would cause debug dll to work and the release version not to work.
I can generate a map but I am terrible at reading it and I function a
lot better when the error occurs in debug mode because then I can use
the debug tool. Would the map be the best approach or is there a
better method. If I generate a map could someone help me find the
correct location in the dll?

Thanks
Jake
 
M

Mark McIntyre

Hello,

I have an exe that calls a dll. The dll is dynamically loaded and I
use getprocaddress to get the address of the funciton I want to call.

Everything seems to work fine in debug mode but in release mode it is
blowing up at the first call to the dll.

You should ask this question again in a Windows programming group,
where the experts at this sort of stuff hang out. My guess is that
you're corrupting memory by overruning an array, or using unitialised
variables or something, and in debug mode you get away with it because
your debug build is more tolerant.

Mark McIntyre
 
K

Karl Malbrain

Mark said:
You should ask this question again in a Windows programming group,
where the experts at this sort of stuff hang out. My guess is that
you're corrupting memory by overruning an array, or using unitialised
variables or something, and in debug mode you get away with it because
your debug build is more tolerant.

Actually, you have this backward. The debug build has more error
checking. karl m
 
K

Kenny McCormack

Hello,

I have an exe that calls a dll. The dll is dynamically loaded and I
use getprocaddress to get the address of the funciton I want to call.

Allow me to be the first to say this - and I say it from the deepness of my
heart, with all the kindness and love one has come to associate with the
helpful posts you get in this newsgroup:

Not portable. Can't discuss it here. Blah, blah, blah.
 
G

Grumble

Jake said:
I have an exe that calls a dll. The dll is dynamically loaded and I
use getprocaddress to get the address of the funciton I want to call.

Try microsoft.public.win32.programmer.*
 
M

Mark McIntyre

Actually, you have this backward. The debug build has more error
checking. karl m

No, I have it forward. The debug build typically has more tolerance of
faults, eg it initialises auto variables to zero, puts in overflow
space round arrays and structs, etc etc.


Mark McIntyre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top