08-09-2013 11:24 AM
hi all,
just have a little problem using this function (after using it successfully many times).
->I want to open and work a second thread by using this fct (see title of this message) inside a dll written with cvi - that runs ok
->then I wrote a second fct into the dll (let us call it "doAfter") that has to be called from the "first" thread after the "second" thread has finished - that is normally no problem and can be done by giving this fct to the CmtScheduleThread...() - arguments..
but in my case (while the second thread worked) the program-pointer of the calling (first) thread has moved outside the dll into a C++ (Qt - not CVI)-application - this is the only difference to other applications i wrote - and the call of "doAfter" doesnt occure. is there a hint or an idea ?
btw:
1. the call of CmtScheduleThreadPoolFunctionAdv() gives back 0="success".
2. calling "doAfter" in the context of the second thread (by RUN_IN_SCHEDULED_THREAD-argument) works. but its not very useful.
thanks and best regards
Simon
08-12-2013 04:33 AM
... oh sorry, it was the wrong place to start a thread. a solution is to start the thread inside Qt and not inside the DLL.