08-12-2005 02:49 PM
08-13-2005 01:37 PM
Looks like you are right!!! I did something and tried to run the program with a simple DLL again. Somehow it didn't run this time.
Anyway, I am trying to make your PumpMessages() work in my test program. I attached the files to explain what I am trying to do here. Without the part for pumping messages, the program works. But, as you can see in my test program, including the pump messages loop directly in main() didn't work and I commented the part out. I guess I need your help.
Could you elaborate on spinning up a thread and including this into a VC++ program? Thanks.
Tom
08-13-2005 01:59 PM
08-15-2005 10:09 AM
08-17-2005 11:45 AM
Brian,
I guess I'm getting desperate here. I'd appreciate it if you can answer the following questions.
1) I included a revised version of the files modified according to your advice. Is this what you meant in my test program? Unfortunately, I get some linking errors. I couldn't find out why.
2) I found that I can run my LV DLL when I put the LV function in my main(),thread-1, and move the other part to the second thread, thread-2. The problem is that I need to have more(for example, thread-3 and thread-4) than one thread run the LV function. Would I still need to pump messages for the thread-3 and -4 even when I have my LV function in main() already?
Thanks,
Tom
08-17-2005 04:30 PM
08-17-2005 04:46 PM
08-19-2005 03:37 PM
Brian,
Seems like I am getting closer. I have set up a separate thread that has LVDLLStatus and PumpMessages. I also put my function in LV DLL into main() and am trying to make the LV DLL function work.
Good news is one of my test LV DLL function worked in MTenvironment, in main() and in other threads generated later. But I found that the LV DLL function works even without the thread for LVDLLStatus and PumpMessages. Here is a funny thing...When I replaced the test LV DLL function with the actual LV DLL function I want to use, only the one in main() worked and the program stopped(got stuck) at the same function in the next thread.
I think this is what you mentioned before. I see one LV DLL function working in an MT program and another function not working in the exactly same MT program!!!
So, here are my questions. (1) Was I right in including the LV DLL function in main()? The thread for pumping messages is called after the LV DLL function. (2) If I was right, I think I did everything set up right for using LV DLL in MT environment. Is it still possible that some LV DLLs do not work?
Tom
08-19-2005 03:53 PM
08-19-2005 06:01 PM