- msvcrtd.dll, msvcrt.dll
- Posted by TheOne on April 3rd, 2008
I compiled a project in debug and release mode, and checked what dll's
are appended in each case using process explorer.
While mfcXXu.dll is replaced by mdfXXud.dll in debug mode, msvcrt.dll
is still attached to debug mode process and additional msvcrtd.dll is
attached. Is it correct behavior? Why doesn't msvcrtd.dll replace
msvcrt.dll?
I ask this because I might have done something wrong in building the
app. So I want to make sure if anything's wrong.
Thanks in advance.
--
Daewon YOON
Replies to this posting goes to : comp.os.ms-windows.programmer.win32
- Posted by Ulrich Eckhardt on April 3rd, 2008
TheOne wrote:
This is not necessarily a sign of a problem but also not necessarily okay. I
would check with dependencywalker. There, if one module directly depends on
both the debug and release variant of a library, you are probably in for
some trouble. Otherwise, if it depends on the debug variant directly but on
the release variant through some other DLL it is probably okay.
I say probably okay, because even then it might be that the other DLL is
requesting memory from the release runtime, passes it to your application
which then releases it to the debug runtime, which would be wrong. However,
normally you don't release the memory directly but rather give it back to
the other DLL which then releases it to its own runtime.
Uli
--
Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932
- Posted by TheOne on April 4th, 2008
On 4¿ù3ÀÏ, ¿ÀÈÄ4½Ã37ºÐ, Ulrich Eckhardt <eckha...@satorlaser.com> wrote:
I check the dependency, and one path to msvcrt.dll is like following :
MFC42UD.DLL - ADVAPI32.DLL - SECUR32.DLL - NETAPI32.DLL - MSVCRT.DLL
I built this with VC6.0.
But still I don't really understand which one should be called, when
the program is calling wcscmp which is list in both dlls.
Is it like,
__ when I call wcscmp from my source code, wcscmp of msvcrtd.dll
__ and when some part of netpai32.dll is calling wcscmp, wcscmp of
msvcrt.dll is called?
My knowledge isn't ready to make me understand this part. Anyway
thanks.
--
Daewon YOON
- Posted by Ulrich Eckhardt on April 4th, 2008
TheOne wrote:
Yes, this is correct.
The typical problem people see when mixing debug/release runtimes is that
they get errors when allocating memory from one runtime and release them to
the other.
Uli
--
Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932