Hannes, I believe CreateThread() is just not guaranteed to work in VB. Isn't it? Your programming system provides an API for thread creation, so use it. For example, in Visual C++ CreateThread() is not quite work (the run-time is dirtily patched to make it work in general, but memory leaks are still possible). Instead, Visual C++ run-time provides special __beginthreadex() function for thread creation, which is a C++ function rather than WinAPI function.
I don't know about VB, but if you're using the C Runtime Library (CRT), _beginthreadex does a better job at initializations when starting threads. If you skip those by using _beginthread or CreateThread, there can be problems in other CRT function execution.
For managed code Joe Duffy (Concurrent Programming on Windows) recommends the System.Threading.Thread class and Start methods.
Bookmarks