Native C++ equivalent of ManualResetEvent from C#

c#, c++, events, synchronization, windows

Solution

You can use CreateEvent to create an event object that you later signal with SetEvent and reset with ResetEvent. You can use a wait function to wait on an event object.

Problem

What's the equivalent methodology of `ManualResetEvent` in native C++. Although the below page gives some APIs for C++, it seems to be valid for C++\CLI, and Windows Runtime scenarios only. http://msdn.microsoft.com/en-us/library/system.threading.manualresetevent(v=vs.110).aspx My Operating System is Windows 8 (x64). IDE: Visual Studio 2012. I am working on a Windows application which has three layers: C#, C++\CLI, and C++ native. I required this feature in C++ native. Even though I currently need it only for Windows environment, it would be useful to know solution even for the Linux environment.

Original source