When you use WaitForSingleObject, the calling thread is suspended, and will be resumed when either the object becomes signaled or the timeout occurs. It's pretty clear that your TCP callback isn't executing because the thread isn't running: it's "asleep" waiting for the object to become signaled. This is a problem (or maybe it would be fairer to say a complexity) of using CVI callbacks and Win32 API calls such as WaitForSingleObject. If you were to make a loop with ProcessSystemEvents and WaitForSingleObject with a short timeout (e.g. 100ms), you would achieve the desired behavior of response to your TCP event (callback) as well as not spinlocking while waiting for it to complete. This same general issue exists with all CVI callbacks, including those from GUI panel
controls.