Creating only one instance
COM
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, I'm very new to COM and just had a simple question. Does CoCreateInstance() check to see if there is another instance already in existance? I am currently using CoCreateInstance() to create my class object, but I only want to do it once. I want to do this: If (there is no instance) then (CoCreateInstance()) else (run code) Is this automatically done within CoCreateInstance or is there another way to check to see if an instance already exists? I want to avoid running CoCreateInstance() multiple times. Thank you.