Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
48
Ultima/ClientHandles.cs
Normal file
48
Ultima/ClientHandles.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
#region References
|
||||
using System;
|
||||
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
#endregion
|
||||
|
||||
namespace Ultima
|
||||
{
|
||||
public class ClientWindowHandle : CriticalHandleZeroOrMinusOneIsInvalid
|
||||
{
|
||||
public static ClientWindowHandle Invalid = new ClientWindowHandle(new IntPtr(-1));
|
||||
|
||||
public ClientWindowHandle()
|
||||
{ }
|
||||
|
||||
public ClientWindowHandle(IntPtr value)
|
||||
{
|
||||
handle = value;
|
||||
}
|
||||
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
if (!IsClosed)
|
||||
{
|
||||
return ReleaseHandle();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class ClientProcessHandle : CriticalHandleZeroOrMinusOneIsInvalid
|
||||
{
|
||||
public static ClientProcessHandle Invalid = new ClientProcessHandle(new IntPtr(-1));
|
||||
|
||||
public ClientProcessHandle()
|
||||
{ }
|
||||
|
||||
public ClientProcessHandle(IntPtr value)
|
||||
{
|
||||
handle = value;
|
||||
}
|
||||
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return NativeMethods.CloseHandle(this) == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user