[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern SafeWindowStationHandle OpenWindowStation(
[MarshalAs(UnmanagedType.LPTStr)]
string lpszWinSta,
[MarshalAs(UnmanagedType.Bool)]
bool fInherit,
AccessMask dwDesiredAccess
);
public sealed class SafeWindowStationHandle : SafeHandleZeroOrMinusOneIsInvalid
{
public SafeWindowStationHandle()
: base(true)
{
}
protected override bool ReleaseHandle()
{
return SafeNativeMethods.CloseWindowStation(handle);
}
}
See Enums.ACCESS_MASK and CloseWindowStation.
Please add some!
Please add some!
Do you know one? Please contribute it!