is there 开发者_开发技巧any kind of semaphore for processes in Windows API? I found this one
but it is only for thread as I understood, thanks in advance for any help
Look at the the help for CreateSemaphore() function: http://msdn.microsoft.com/en-us/library/ms682438(v=VS.85).aspx in the Remarks section, starting from "Multiple processes can handles....".
You'll find 3 cases there - all of them useful.
Use CreateSemaphore or CreateSemaphoreEx to create a named semaphore. You can use the name to access the semaphore from other locations by calling CreateSemaphore
a second time.
精彩评论