Thursday, February 10, 2005

The DLL problem's solution

The problem was that I use a global buffer that is initialized upon DLL load to a certain string. However, the buffer length I was using was too small to contain the whole string, so it was bombing out with an Access Violation. Of course, for Debug builds, the compiler adds a little extra space for each buffer, so the problem did not occur there. Release builds, trying to get things as tight as possible, does not add any extra buffer, and I ran right into the overflow as soon as my program tried to load the DLL.

The Access Violation should have given me a better clue as to what was going on. Now it works and I have one more thing to think about when something goes wrong.


Post a Comment

Links to this post:

Create a Link

<< Home