Why does the debugger stop execution and give an error when WaitForSingleObject() is called on a closed HANDLE?? when I run my program outside of the VS2010 IDE, WaitForSingleObject(invalid handle) just returns WAIT_FAILED like its supposed to. Is there anything actually wrong with calling it on an invalid handle?
VBNick
3
Junior Poster
Recommended Answers
Jump to PostAre you maybe executing a release build outside of VS, and inside a debug build? In that case there could be an assertation in the function.
The documentation does not state that the handle must be valid... it does state that if the handle is closed while the wait …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.