public static WindowStationHandle Open(string name, bool inheritHandle, WindowStationAccessRights desiredAccess)
 {
     var handle = new WindowStationHandle(NativeMethods.OpenWindowStation(name, inheritHandle, desiredAccess), true);
     if (handle.IsInvalid)
     {
         ErrorHelper.ThrowCustomWin32Exception();
     }
     return handle;
 }
        public static WindowStationHandle Open(string name, bool inheritHandle, WindowStationAccessRights desiredAccess)
        {
            var handle = new WindowStationHandle(NativeMethods.OpenWindowStation(name, inheritHandle, desiredAccess), true);

            if (handle.IsInvalid)
            {
                ErrorHelper.ThrowCustomWin32Exception();
            }
            return(handle);
        }
Exemple #3
0
 public WindowStationSecurity(WindowStationHandle handle, AccessControlSections includeSections, bool isContainer = false)
     : base(isContainer, ResourceType.WindowObject, handle, includeSections)
 {
 }
 public static extern bool SetProcessWindowStation(WindowStationHandle handle);
 public static extern bool SetProcessWindowStation(WindowStationHandle handle);
 public WindowStationSecurity(WindowStationHandle handle, AccessControlSections includeSections, bool isContainer = false)
     : base(isContainer, ResourceType.WindowObject, handle, includeSections)
 {
 }