#include #include #define CYGWIN_IPCNT_SEMSEM "MultiSemSem_" int main() { HANDLE handle = OpenSemaphore(SEMAPHORE_ALL_ACCESS, FALSE, CYGWIN_IPCNT_SEMSEM); if (handle) { printf("%ld = OpenSemaphore() succeeded\n", handle); CloseHandle(handle); } else { printf("OpenSemaphore() failed with last error = %ld\n", GetLastError()); } return 0; }