Reputation: 823
I have a DLL which exports a few functions. The source file contains a global pointer to an instance of a class and within one of the exported functions (Init) it allocates the pointer, the rest of the functions then make calls to that class' member functions using the pointer and return the results.
My question is if several applications use this DLL at once will they all have a unique instance of the internal class, as it contains member data which must be unique to each instance.
Thankyou.
Upvotes: 1
Views: 138
Reputation: 258588
Yes, each application will load the DLL in its own memory and create its own instance of the class.
Upvotes: 3