Exemplo n.º 1
0
 public static void UndoImpersonate(RunAsContext contextWrapper)
 {
     if (contextWrapper != null &&
         contextWrapper.Context != null)
     {
         contextWrapper.Context.Undo();
     }
     if (contextWrapper.TokenHandle != IntPtr.Zero)
         CloseHandle(contextWrapper.TokenHandle);
 }
Exemplo n.º 2
0
 public static void UndoImpersonate(RunAsContext contextWrapper)
 {
     if (contextWrapper != null &&
         contextWrapper.Context != null)
     {
         contextWrapper.Context.Undo();
     }
     if (contextWrapper.TokenHandle != IntPtr.Zero)
     {
         CloseHandle(contextWrapper.TokenHandle);
     }
 }