Exemplo n.º 1
0
 private void DeferredSessionChange(int eventType, IntPtr eventData)
 {
     try
     {
         System.ServiceProcess.NativeMethods.WTSSESSION_NOTIFICATION structure = new System.ServiceProcess.NativeMethods.WTSSESSION_NOTIFICATION();
         Marshal.PtrToStructure(eventData, structure);
         this.OnSessionChange(new SessionChangeDescription((SessionChangeReason)eventType, structure.sessionId));
     }
     catch (Exception exception)
     {
         this.WriteEventLogEntry(Res.GetString("SessionChangeFailed", new object[] { exception.ToString() }), EventLogEntryType.Error);
         throw;
     }
 }
 private void DeferredSessionChange(int eventType, IntPtr eventData)
 {
     try
     {
         System.ServiceProcess.NativeMethods.WTSSESSION_NOTIFICATION structure = new System.ServiceProcess.NativeMethods.WTSSESSION_NOTIFICATION();
         Marshal.PtrToStructure(eventData, structure);
         this.OnSessionChange(new SessionChangeDescription((SessionChangeReason) eventType, structure.sessionId));
     }
     catch (Exception exception)
     {
         this.WriteEventLogEntry(Res.GetString("SessionChangeFailed", new object[] { exception.ToString() }), EventLogEntryType.Error);
         throw;
     }
 }