I've search the net and come across _beginthread,_beginthreadex and CreateMutex which can handle the function to be threaded.
My question is, how do use those function respectfully to be able to get the return value of the threaded function and pass a single argument which always changes?