Hi, I am programming some console application that updates itself periodically from Internet. (windows.h + pthreads for win32)
I want to do something like:
MAIN FUNCTION: create thread launch updater THREAD: infinite loop - starts the main application, exits if application ended normally but when it was killed by updater, start it again. UPDATER: checks, if updates are available → kill main app and download new version.
To the application, I need a PROCESS_INFORMATION pi, but:
when i define it globally, the THREAD function freezes when tryiing to CreateProcess.
when i tried to define it like a pointer, compiler told me I am stupid. What should I do?