Since you are creating a named event, the event is accessible to other processes which know the name. That other process may be waiting on the event as well, causing it to eat the signal. Unless there is some reason that the event needs to be visible to other processes, you should pass NULL
as the event name. That creates an anonymous event which other processes cannot access.
Note that if give the event a name, then you will have the problem that if two copies of your program are running, they will both be using the same event, which will create this same problem.