+#else
+ Mutex() { mutex=CreateMutex(0, false, 0); }
+ int lock() { return WaitForSingleObject(mutex, INFINITE)==WAIT_OBJECT_0; }
+ int trylock() { return WaitForSingleObject(mutex, 0)==WAIT_OBJECT_0; }
+ int unlock() { return !ReleaseMutex(mutex); }
+ ~Mutex() { CloseHandle(mutex); }
+#endif