Re: Multiple instances of DLL in memory.
From: Peter Below (TeamB) (100113.1101_at_compuXXserve.com)
Date: 11/28/03
- Next message: Martin James: "Re: Multiple instances of DLL in memory."
- Previous message: Peter Below (TeamB): "Re: File Sharing Problem"
- In reply to: Ihor Bobak: "Multiple instances of DLL in memory."
- Next in thread: Martin James: "Re: Multiple instances of DLL in memory."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 19:57:04 +0100
In article <3fc76f93@newsgroups.borland.com>, Ihor Bobak wrote:
> I created a dll which sets a global WH_SHELL hook,
> and .exe which uses this dll.
>
> This dll sends messages to a window in my .exe when
> the global hook procedure is called by some process.
>
> The problem is next: this dll is loaded for each process
> separately. Process Viewer shows 10 or more copies of my
> dll in memory (used by each process which called my
> hook procedure).
>
> I cannot understand why my dll is not loaded just once?
> I saw many examples (written on C++) which set the
> same hook in the same way, but their dll is loaded
> only once and used by many processes simultaneously.
A hook DLL is always loaded into each running process, regardless of
what it has been written in. The OS will share the code pages between
processes but not the data pages, unless they have been marked as
shared memory. The Delphi linker does not support this but VC++ does,
for example.
-- Peter Below (TeamB) Use the newsgroup archives : http://www.mers.com/searchsite.html http://www.tamaracka.com/search.htm http://groups.google.com http://www.prolix.be
- Next message: Martin James: "Re: Multiple instances of DLL in memory."
- Previous message: Peter Below (TeamB): "Re: File Sharing Problem"
- In reply to: Ihor Bobak: "Multiple instances of DLL in memory."
- Next in thread: Martin James: "Re: Multiple instances of DLL in memory."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|