There's more trouble with CVI and XP.
I have trouble with using the windows SDK multi threading functions (CreateThread() etc) in XP with CVI 6. The programs will crash unexpectedly, hang waiting for threads to finish which are already finished etc. The exact same programs run absolutely fine on the exact same computer (dual boot) on W2K.
I have posted this incompatibility with a test program earlier:
http://forums.ni.com/ni/board/message?board.id=180&message.id=10956#M10956
The problem hasn't been solved yet, to my knowledge at least, and the fact there are more problems with CVI/XP might suggest these are all related. Which in my case would be a good thing, as NI points to MS as their SDK not working correctly (the NI thread pool didn't cause a crash). When more problems arise with CVI/XP the need to solve things will become greater because slowly but surely CVI is moving into a position where it cannot be used anymore as a serious compiler for computers running XP. Be it MS or NI who caused the incompatibility, it needs to be fixed eventually...
Maybe your solution will work for the threading problem as well (I'll certainly try it), but it remains a work around for both problems, and a pretty tough one at that. Of course it isn't an option to ask all your clients to perform this action to be able to run your program. For a single program in a single lab on a computer you administer yourself it might work, but *clients* will look for a more professional programmer pretty soon when you tell them your program only works when there's some serious hacking done first.
Your find might be a good starting point for NI to find the source of the problem though. Good work!
Erwin Timmerman