mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
Undo of some cleanup which causes issues,
This commit is contained in:
parent
e781bdcd5c
commit
5c04af1684
2 changed files with 63 additions and 1 deletions
|
@ -359,6 +359,16 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
|||
/// A SafeHandle class implementation for the hIcon
|
||||
/// </summary>
|
||||
public class SafeIconHandle : SafeHandleZeroOrMinusOneIsInvalid {
|
||||
|
||||
/// <summary>
|
||||
/// Needed for marshalling return values
|
||||
/// </summary>
|
||||
[SecurityCritical]
|
||||
public SafeIconHandle() : base(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public SafeIconHandle(IntPtr hIcon) : base(true) {
|
||||
SetHandle(hIcon);
|
||||
}
|
||||
|
@ -380,6 +390,13 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
|||
|
||||
private readonly IntPtr _hWnd;
|
||||
|
||||
/// <summary>
|
||||
/// Needed for marshalling return values
|
||||
/// </summary>
|
||||
public SafeWindowDCHandle() : base(true)
|
||||
{
|
||||
}
|
||||
|
||||
[SecurityCritical]
|
||||
public SafeWindowDCHandle(IntPtr hWnd, IntPtr preexistingHandle) : base(true) {
|
||||
_hWnd = hWnd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue