> Just a small question, where i have not yet found a solution:
I have a DLL with a shared area. This shared area contains a simple
initialized integer,
which is set e.g. to a value of 10.000. Every time the DllMain is called,
i print the value and increase it by one.
(It is only a test, part of a bigger implementation).
I can use the DLL from an exe, call the same exe a second time in parallel
and i see the counter increasing.
I can also renaming the exe to another name and call it,
again i see the counter increasing.
Of course when it is not used anymore, it is unloaded and next time
the counter restarts at initial value (10.000).
Now the question / problem:
When i use an exe, which uses a different dll, which inside the dll calls
my test dll
(with the shared memory), then i get a new counter (new “shared” memory)
instead of the existing one. So sharing of the integer variable is not
more working.
Why is this the case? Is it just a bug somewhere in my implementation
or is this a valid / known behavior? Is there perhaps a workaround?
I think i saw somewhere the use of a memory mapped file
instead of the shared memory. Is it the way to go?
What you have not yet confirmed with anyone is what you mean by “uses the
DLL”?
Is it literally the SAME DLL, loaded from the exactly same path? Or is it
a copy of the DLL, loaded from the executable directory, and each
executable is in its own directory? If you have a file which is a
bitwise identical copy of DLL A, call it DLL A’, as far as the OS is
concerned A’ != A, because it is loaded from a different path. Until you
can confirm that it is EXACTLY the same DLL file being loaded, there’s
nothing more can be said on this.
joe
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer