21 lines
495 B
C#
21 lines
495 B
C#
namespace Standard
|
|
{
|
|
using Microsoft.Win32.SafeHandles;
|
|
using System;
|
|
using System.Runtime.ConstrainedExecution;
|
|
|
|
internal sealed class SafeHBITMAP : SafeHandleZeroOrMinusOneIsInvalid
|
|
{
|
|
private SafeHBITMAP() : base(true)
|
|
{
|
|
}
|
|
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
|
protected override bool ReleaseHandle()
|
|
{
|
|
return Standard.NativeMethods.DeleteObject(base.handle);
|
|
}
|
|
}
|
|
}
|
|
|