c++ - Using COM object in parallel_for loop, -


In my code I am using a parallel_for loop, in this loop I am calling from the COM object, But when it moves, it has not been executed correctly, something that says that COM can not be executed in any other thread,

what do I have to do, do I have to multiply or multiply What to do,

This is my code

  COMObject myCom; Parallel_for (tall (1), count, [& amp;] (long i) {myCom-> few calls (i);});  

I think you should set MTAThreadAttribute [MTAThread] need to . For more information see:



Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -