开发者

inter-process semaphores in Windows

开发者 https://www.devze.com 2023-03-23 07:43 出处:网络
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 helpLook at the the help for CreateSe

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号