积极答复者
如何创建在进程间能够共享的事件?

问题
答案
-
-
HANDLE WINAPI CreateEvent(
__in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
__in BOOL bManualReset,
__in BOOL bInitialState,
__in_opt LPCTSTR lpName
);
请参看MSDN最后一个参数的说明。Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已标记为答案 Damon ZhengModerator 2013年1月23日 12:06
全部回复
-
-
msdn下面写了3种方法:
- A child process created by the CreateProcess function can inherit a handle to an event object if the lpEventAttributes parameter of CreateEvent enabled inheritance.
- A process can specify the event-object handle in a call to the DuplicateHandle function to create a duplicate handle that can be used by another process.
- A process can specify the name of an event object in a call to the OpenEvent or CreateEvent function.
-
HANDLE WINAPI CreateEvent(
__in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
__in BOOL bManualReset,
__in BOOL bInitialState,
__in_opt LPCTSTR lpName
);
请参看MSDN最后一个参数的说明。Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已标记为答案 Damon ZhengModerator 2013年1月23日 12:06