I have a question about multiple instances of a DLL in a single
application. I think I understand this, but I want to make sure I
understand it correctly.
This is the scenerio :
(1) EXE calls a DLL's functions (lets call the DLL MainDLL.dll)
By using a INC file with declares, this forces Windows to
automatically load the DLL when the EXE is loaded and run.
This is instance #1 .
(2) A second DLL is also called by the EXE (declaring the functions
in an INC file) (lets call this DLL MyDLL2.dll). This second DLL
explicitly calls functions in the first DLL (MainDLL.dll).
My question is :
How many different Instances of MainDLL.dll does this create for
the EXE application ?
Does the second DLL's (MyDLL2.dll) calls into MainDLL.dll cause
Windows to initialize a second Instance of the DLL (MainDLL.dll) ?
If there are two instances of the DLL (mainDLL.dll), then do they have
different data segments for storing global variables defined in the
DLL ?
------------------
application. I think I understand this, but I want to make sure I
understand it correctly.
This is the scenerio :
(1) EXE calls a DLL's functions (lets call the DLL MainDLL.dll)
By using a INC file with declares, this forces Windows to
automatically load the DLL when the EXE is loaded and run.
This is instance #1 .
(2) A second DLL is also called by the EXE (declaring the functions
in an INC file) (lets call this DLL MyDLL2.dll). This second DLL
explicitly calls functions in the first DLL (MainDLL.dll).
My question is :
How many different Instances of MainDLL.dll does this create for
the EXE application ?
Does the second DLL's (MyDLL2.dll) calls into MainDLL.dll cause
Windows to initialize a second Instance of the DLL (MainDLL.dll) ?
If there are two instances of the DLL (mainDLL.dll), then do they have
different data segments for storing global variables defined in the
DLL ?
------------------
Comment