[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern SafeWindowStationHandle GetProcessWindowStation();
public sealed class SafeWindowStationHandle : SafeHandleZeroOrMinusOneIsInvalid
{
public SafeWindowStationHandle()
: base(true)
{
}
protected override bool ReleaseHandle()
{
return SafeNativeMethods.CloseWindowStation(handle);
}
}
Quote from MSDN: "The CloseWindowStation function closes an open window station handle. Do not specify the handle returned by the GetProcessWindowStation function."
Please add some!
Please add some!
Do you know one? Please contribute it!