Saul775
2006-03-27 14:32:01 UTC
Hello, all:
I'm creating an application that interfaces with a piece of machinery. The
software that came with the machinery has COM/OLE methods that I can use,
etc. to customize the machinery more to my use.
I've created a program that uses these methods. However, when I tried to
multithread the application I created, I noticed the global members that were
declared were not working in the new thread.
I determined the solution to the problem to be that I needed to call
CoInitializeEx(NULL, COINIT_MULTITHREADED) instead of CoInitialize(NULL).
Now here's the problem. Now that I've changed to CoInitializeEx(), it seems
the application will not CoCreateInstance() UNLESS the application that came
from the manufacturer is opened! However, before, when I CoCreateInstance()
with just CoInitialize(), MY application would CoCreateInstance(), which THEN
brought up the manufacturer's application. Any ideas how I can fix this to
revert to the original setup?
Thank you.
I'm creating an application that interfaces with a piece of machinery. The
software that came with the machinery has COM/OLE methods that I can use,
etc. to customize the machinery more to my use.
I've created a program that uses these methods. However, when I tried to
multithread the application I created, I noticed the global members that were
declared were not working in the new thread.
I determined the solution to the problem to be that I needed to call
CoInitializeEx(NULL, COINIT_MULTITHREADED) instead of CoInitialize(NULL).
Now here's the problem. Now that I've changed to CoInitializeEx(), it seems
the application will not CoCreateInstance() UNLESS the application that came
from the manufacturer is opened! However, before, when I CoCreateInstance()
with just CoInitialize(), MY application would CoCreateInstance(), which THEN
brought up the manufacturer's application. Any ideas how I can fix this to
revert to the original setup?
Thank you.