Click to See Complete Forum and Search --> : Prevent 2 threads from accessing COM object


trivektor
01-22-2009, 09:14 PM
Hi,

I have an application which create some threads to invoke Corel Draw COM object to generate some images. Can anyone give me some suggestion on how to prevent 2 threads created at the same time from invoking Corel Draw COM object? Thanks.

chazzy
01-23-2009, 07:24 AM
maybe you could use a singleton, instead of each thread responsible for creating the thread itself, create a singleton object in memory that does it.