Re: MFC DLL at Application Folder Saves Memory As Well?



Cat <typingcat@xxxxxxxxx> wrote:
> If Not...
> I can delete the later one's own MFC71.dll. It still works fine as
> long as the MFC71.dll file exists in Windows\System32. In this case,
> do the two applications share memory and I can save memory?

Yes, in this case the two application share and save some physical
memory.

Be aware of the downside of this approach. Suppose the user installs
application A that drops the DLL into system32. She then installs an
unrelated application B, that checks whether the DLL is already present
and does not install its own copy in its local directory if it finds
that a copy already exists in system32. Both applications work fine, the
user is happy.

Some time later, she decides to uninstall application A. Being a good
citizen, A carefully removes all the files it has installed, including
the DLL in system32. Suddenly, a seemingly unrelated application B stops
working.

Search MSDN for the phrase "DLL Hell" to fully appreciate the issue.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: Why do we need executables in certain formats ?
    ... > complex binary formats was that programs need to be relocated, ... > perhaps linked with libraries. ... Modern virtual memory processors can locate to ... > has a hidden problem with the new .DLL. ...
    (comp.lang.asm.x86)
  • Re: Why is Base3.exe using 700+ K in windows task manager ?
    ... DLL function. ... handles opened by any thread of the calling process ... The DLL allocates memory from the virtual address space of the calling ... Who can tell where memory is really located in a virtual adress space? ...
    (alt.lang.asm)
  • Re: shared DLL VS static Link, Are they different?
    ... MFC exits, and if there is any memory that is freed at that time, MFC will ... business dumping leaks; it should wait until the CRT DLL dumps leaks after ... ALL RESOURCES OWNED BY THAT PROCESS ARE RELEASED. ...
    (microsoft.public.vc.mfc)
  • Re: Linking to a .NET dll from C#
    ... for obtaining price quotes and performance is absolutely critical. ... be to use shared memory or memory mapped files. ... Be aware that in these scenarios you're responsible for patching and updates, as the application will no longer rely on the clients machine to keep the framework up to date. ... Determine if a certain managed .NET dll or assembly is loaded ...
    (microsoft.public.dotnet.general)
  • Re: Where did my VB function go?
    ... If the VB application loads the C++ DLL, the DLL gets ... And there is a very common error with shared memory, ... A DLL has a shared memory section. ... series of coherent linked lists local to each attached process. ...
    (microsoft.public.vb.winapi)