Solved

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

Posted on 2002-06-25
3
192 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:pricciar
3 Comments
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7109501
Try to change CComSingleThreadModel --> CComObjectThreadModel.
0
 
LVL 12

Accepted Solution

by:
migel earned 200 total points
ID: 7109911
Hi!
Check if you use
DECLARE_CLASSFACTORY_SINGLETON in the your class
replace this to the DECLARE_CLASSFACTORY or just remove this line
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now