Creating an ATL DLL that will allow objects to have multiple instances.

I have created an ATL DLL. I am able to access it from Visual Basic using the standard CreateObject("") function call.
But, I can only create one instance of an object calling that function. How can I tell Visual Basic, or my DLL to create two different objects?

Thanks for any help.

pat
pricciarAsked:
Who is Participating?
 
migelCommented:
Hi!
Check if you use
DECLARE_CLASSFACTORY_SINGLETON in the your class
replace this to the DECLARE_CLASSFACTORY or just remove this line
0
 
BeyondWuCommented:
Try to change CComSingleThreadModel --> CComObjectThreadModel.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.