I rewrote 'test.c' to give a deterministic output. Furthermore i wrote a super-silly 'test2.c' to check the SRWLocks. Both work and give the desired result :)
In my current project the support for CONDITION_VARIABLEs would be of great help. I added the above suggested codelines to my project and it worked. I also wrote a test-programm (attached to this post) which spawns 4 threads and syncs via a mutex (CRITICAL_SECTION) and a condition (CONDITION_VARIABLE).