DWORD WINAPI ActualizaStatus(LPVOID param){ MessageBox(NULL,"THIS SHOULD WORK ON 98","Nice Thread",MB_OK)}
This doesnt work
DWORD WINAPI ActualizaStatus(LPVOID param){ MessageBox(NULL,"THIS SHOULD WORK ON 98","Nice Thread",MB_OK)}
quote:Original post by LastResort
It ends when the app ends..
...while(1){ WaitForSingleObject(hTimer,INFINITE); StatusReport((HWND)param); // unimportant function}
quote:
It also looks like your not linking with the multithreaded runtime libraries. This may have been the problem all along (however _beginthreadex should always be used over CreateThread).
quote:
I can always change while(1) by while(RUNNING) or something.. that was just an example.. I have other threads that do their job and end before the process ends. But, when the app ends, so does the process, wich means, all current threads end.. even if they are on a while(1). Correct me if im wrong
quote:Original post by Solo
Actually you''re right and I''m wrong. Somehow I got the idea that a running thread will keep the process alive (probably because I usually wait for my worker threads to end before I allow the primary thread to exit). MSDN says the opposite and so did the test I ran. Anyway, you should still allow the thread to exit in a controlled fashion. If another thread (like the primary thread) releases resources used by StatusReport() during shutdown (like HWND''s of windows that have been closed) your runnaway thread could generate errors.
quote:Original post by DigitalDelusion
Ok, I guess this actually falls under the RT(F)M category:
The last parameter of CreateThread can''t be NULL under Win9x.