| | 1 | | using System; |
| | 2 | | using SharpHoundRPC.NetAPINative; |
| | 3 | |
|
| | 4 | | namespace SharpHoundRPC.Handles |
| | 5 | | { |
| | 6 | | public class NetAPIPointer : BasePointer |
| | 7 | | { |
| 1 | 8 | | public NetAPIPointer() : base(true) |
| 1 | 9 | | { |
| 1 | 10 | | } |
| | 11 | |
|
| 0 | 12 | | public NetAPIPointer(IntPtr handle) : base(handle, true) |
| 0 | 13 | | { |
| 0 | 14 | | } |
| | 15 | |
|
| 0 | 16 | | public NetAPIPointer(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 NetAPIMethods.NetApiBufferFree(handle) == NetAPIEnums.NetAPIStatus.Success; |
| 0 | 24 | | } |
| | 25 | | } |
| | 26 | | } |