Strange DLL behavior

  • Thread starter Thread starter bikerider7
  • Start date Start date
B

bikerider7

Has anyone seen a problem like this?

I have a DLL module, statically linked into an executable. When
running small testcases, everything works fine -- the executable
is able to call functions in the DLL. But then when a very
large testcase is run (i.e. more memory is allocated), at runtime
the executable cannot call the DLL API routines and gives the
infamous "Module not found" error.

Setting breakpoints with the debugger, it is clear the program
never even enters the DLL routine, so it isn't a case of the
DLL routine running out of memory.

The exact error msg: "Unhandled exception at xxxx in foo.exe:
0xC06D007E: Module not found."
 
bikerider7 said:
Has anyone seen a problem like this?

I have a DLL module, statically linked into an executable. When
running small testcases, everything works fine -- the executable
is able to call functions in the DLL. But then when a very
large testcase is run (i.e. more memory is allocated), at runtime
the executable cannot call the DLL API routines and gives the
infamous "Module not found" error.

Setting breakpoints with the debugger, it is clear the program
never even enters the DLL routine, so it isn't a case of the
DLL routine running out of memory.

The exact error msg: "Unhandled exception at xxxx in foo.exe:
0xC06D007E: Module not found."

It would appear as though you're corrupting memory; perhaps walking on your
stack. You may wish to profile your application with Dependency Walker
http://www.dependencywalker.com/ to ensure that the expected DLL is being
loaded.
 
Back
Top