hello,
How can I define a shared variable in a DLL that all instance of the DLL
use it ( similar to a static variable in a class).

Best regards

Re: shared variable in DLL by Jochen

Jochen
Tue Apr 19 06:56:35 CDT 2005

Hi ma!
> How can I define a shared variable in a DLL that all instance of the DLL
> use it ( similar to a static variable in a class).

See: How to share a data segment in a DLL
http://www.codeproject.com/dll/data_seg_share.asp


An other way is to use (explicit) Shared-Memory:

See: Using Shared Memory in a Dynamic-Link Library
http://msdn.microsoft.com/library/en-us/dllproc/base/using_shared_memory_in_a_dynamic_link_library.asp

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/