Win32 DLL

R

ramialhasan

I have good experience with COM ATL object, but recently I needed to
deal with Win32 DLLs.


I have some question relating to their model of work. In COM objects
every client of the com server will have a special instance that may
include local variables visible to that instance only.


In Win32 DLL, does every client have his own instance with some local
variables that are only updated by him? Or Do all clients handle the
same instance of the DLL?


If all clients have to deal with single instance, where are the data
related to certain client stored as e.g open handles,..

If I have two different EXEs(processes), and both open the same DLL,
are the DLL global data shared between the two processes or every
processs has its own global data?

Thanks for help.
Rami.
 
D

David Lowndes

If I have two different EXEs(processes), and both open the same DLL,
are the DLL global data shared between the two processes or every
processs has its own global data?

Rami,

Unless you specifically create shared variables, any global variables
in a DLL are per-process (each process that loads the DLL has its own
global variables).

Dave
 
S

Severian

I have good experience with COM ATL object, but recently I needed to
deal with Win32 DLLs.


I have some question relating to their model of work. In COM objects
every client of the com server will have a special instance that may
include local variables visible to that instance only.


In Win32 DLL, does every client have his own instance with some local
variables that are only updated by him? Or Do all clients handle the
same instance of the DLL?


If all clients have to deal with single instance, where are the data
related to certain client stored as e.g open handles,..

If I have two different EXEs(processes), and both open the same DLL,
are the DLL global data shared between the two processes or every
processs has its own global data?

It takes special work, and special requirements, for sharing data
between processes through DLLs. Most DLLs do not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top