In my application the program writes to a device through RS232 and then waits for an answer. If a correct answer has not arrived after 5 seconds the application should do a new write. Non overlapped communication is used. The function that does the reading is named ReadCom. WaitForSingleObject wants a handle as first argument. How can I create a handle that is related to the ReadCom function?
Or is there any other solution than using WaitForSingleObject?