CEvent::CEvent

CEvent( BOOL bInitiallyOwn = FALSE, BOOL bManualReset = FALSE, LPCTSTR lpszName = NULL, LPSECURITY_ATTRIBUTES lpsaAttribute = NULL );

Parameters

bInitiallyOwn

If TRUE, the thread for the CMultilock or CSingleLock object is enabled. Otherwise, all threads wanting to access the resource must wait.

bManualReset

If TRUE, specifies that the event object is a manual event, otherwise the event object is an automatic event.

lpszName

Name of the CEvent object. Must be supplied if the object will be used across process boundaries. If the name matches an existing event, the constructor builds a new CEvent object which references the event of that name. If the name matches an existing synchronization object that is not an event, the construction will fail. If NULL, the name will be null.

lpsaAttribute

Security attributes for the event object. For a full description of this structure, see SECURITY_ATTRIBUTES in the Win32 SDK Programmer’s Reference.

Remarks

Constructs a named or unnamed CEvent object. To access or release a CEvent object, create a CMultiLock or CSingleLock object and call its Lock and Unlock member functions.

To change the state of a CEvent object to signaled (threads do not have to wait), call SetEvent or PulseEvent. To set the state of a CEvent object to nonsignaled (threads must wait), call ResetEvent.

CEvent OverviewClass MembersHierarchy Chart