Exemplo n.º 1
0
 public virtual void Dispose()
 {
     CoreDLL.CloseHandle(_hSyncHandle);
 }
Exemplo n.º 2
0
 public WaitObjectReturnValue Wait(int timeout)
 {
     return((WaitObjectReturnValue)CoreDLL.WaitForSingleObject(_hSyncHandle, timeout));
 }
Exemplo n.º 3
0
 public WaitObjectReturnValue Wait()
 {
     return((WaitObjectReturnValue)CoreDLL.WaitForSingleObject(_hSyncHandle, -1));
 }
Exemplo n.º 4
0
 public bool SetEvent()
 {
     return(CoreDLL.EventModify(_hSyncHandle, (int)EventAction.Set));
 }
Exemplo n.º 5
0
 public int GetEventData()
 {
     return(CoreDLL.GetEventData(_hSyncHandle));
 }
Exemplo n.º 6
0
 public void SetEventData(int data)
 {
     CoreDLL.SetEventData(_hSyncHandle, data);
 }
Exemplo n.º 7
0
 public bool  PulseEvent()
 {
     return(CoreDLL.EventModify(_hSyncHandle, (int)EventAction.Pulse));
 }
Exemplo n.º 8
0
 public SystemEvent(string name, bool manualReset, bool initialState)
 {
     _manualReset        = manualReset;
     _hSyncHandle        = CoreDLL.CreateEvent(IntPtr.Zero, manualReset, initialState, name);
     this._firstInstance = (0 == Marshal.GetLastWin32Error());
 }