| | 1 | | using System; |
| | 2 | | using SharpHoundRPC.LSANative; |
| | 3 | |
|
| | 4 | | namespace SharpHoundRPC.Handles |
| | 5 | | { |
| | 6 | | public class LSAPointer : BasePointer |
| | 7 | | { |
| 0 | 8 | | public LSAPointer() : base(true) |
| 0 | 9 | | { |
| 0 | 10 | | } |
| | 11 | |
|
| 0 | 12 | | public LSAPointer(IntPtr handle) : base(handle, true) |
| 0 | 13 | | { |
| 0 | 14 | | } |
| | 15 | |
|
| 0 | 16 | | public LSAPointer(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle) |
| 0 | 17 | | { |
| 0 | 18 | | } |
| | 19 | |
|
| | 20 | | protected override bool ReleaseHandle() |
| 0 | 21 | | { |
| 0 | 22 | | if (handle == IntPtr.Zero) return true; |
| 0 | 23 | | return LSAMethods.LsaFreeMemory(handle) == NtStatus.StatusSuccess; |
| 0 | 24 | | } |
| | 25 | | } |
| | 26 | | } |