02-12-2007 11:35 PM
02-14-2007 09:08 AM
02-14-2007 12:26 PM
Hi,
I am using CNiGraph,CNiKnob controls.
If i start a new project i have no problem to work with these controls.
The problem is, that i have an existing project, i added the NI classes to this project
When my project is starting i am calling the CoiIntializeEX(NULL,COINIT_MULTITHREADED) function --> i am using MTA threading model.
When the dialog with the CNiGraph,CNiKnob controls is created OLE assert is produced.
I tried replacing the call to the CoiIntializeEX(NULL,COINIT_MULTITHREADED) when the application start to this: CoiIntializeEX(NULL,COINIT_APARTMENTTHREADED)
using the using STA threading model and when i load the dialog with the CNiGraph,CNiKnob controls there was no assert and all was OK.
But i can't use the STA threading model because i have several threads in my project that should use the DCOM and it could not be done if i use the
COINIT_APARTMENTTHREADED in the CoiIntializeEX function.
So how can i solve the problem of working with OLE controls in DCOM environment with MTA threading model???
02-15-2007 01:30 PM