The main thread is the simplest and effective way to communicate with the secondary wire with the midplass communication. For example, the following code: uint threadProc (lpvoid pParam) {g_ncount = 0; while (g_ncount <100) :: InterlockedIncrement ((long *) & g_ncount); return 0;}