Exemplo n.º 1
0
 public override string ToString()
 {
     return(string.Format("{0}/{1}/{2}/{3}",
                          WindowStationHandle.ToString(),
                          WindowDesktopHandle.ToString(),
                          WindowHandle.ToString(),
                          base.ToString()));
 }
Exemplo n.º 2
0
        public static void SetDesktopWinStaAccess()
        {
            using (var wsHandle = new WindowStationHandle("WinSta0", (WindowStationAccess)StandardRights.WriteDac))
                wsHandle.SetSecurity(SecurityInformation.Dacl, new SecurityDescriptor());

            using (var dhandle = new DesktopHandle("Default", false,
                                                   (DesktopAccess)StandardRights.WriteDac | DesktopAccess.ReadObjects | DesktopAccess.WriteObjects))
                dhandle.SetSecurity(SecurityInformation.Dacl, new SecurityDescriptor());
        }
Exemplo n.º 3
0
        public static void SetDesktopWinStaAccess()
        {
            using (var wsHandle = new WindowStationHandle("WinSta0", (WindowStationAccess)StandardRights.WriteDac))
                wsHandle.SetSecurity(SecurityInformation.Dacl, new SecurityDescriptor());

            using (var dhandle = new DesktopHandle("Default", false,
                (DesktopAccess)StandardRights.WriteDac | DesktopAccess.ReadObjects | DesktopAccess.WriteObjects))
                dhandle.SetSecurity(SecurityInformation.Dacl, new SecurityDescriptor());
        }