Skip to content

Commit d831fe9

Browse files
committed
Added updates to expose some internal RPC state.
1 parent f501a66 commit d831fe9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

NtApiDotNet/Ndr/Marshal/NdrUnmarshalBuffer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ internal static void CheckDataRepresentation(NdrDataRepresentation data_represen
249249
}
250250
}
251251

252+
public byte[] ReadRemaining()
253+
{
254+
return _reader.ReadAll((int)_reader.RemainingLength());
255+
}
256+
252257
#endregion
253258

254259
#region Primitive Types
@@ -335,7 +340,6 @@ public NdrEnum16 ReadEnum16()
335340
#endregion
336341

337342
#region Fixed Array Types
338-
339343
public byte[] ReadFixedByteArray(int count)
340344
{
341345
byte[] ret = _reader.ReadBytes(count);

NtApiDotNet/Win32/Rpc/RpcClientResponse.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ public sealed class RpcClientResponse
3636
/// </summary>
3737
public NdrDataRepresentation DataRepresentation { get; }
3838

39-
internal RpcClientResponse(byte[] ndr_buffer, IEnumerable<NtObject> handles)
39+
/// <summary>
40+
/// Constructor.
41+
/// </summary>
42+
/// <param name="ndr_buffer">The NDR buffer.</param>
43+
/// <param name="handles">List of handles</param>
44+
public RpcClientResponse(byte[] ndr_buffer, IEnumerable<NtObject> handles)
4045
{
4146
NdrBuffer = ndr_buffer;
4247
Handles = new List<NtObject>(handles.Select(o => o.DuplicateObject()));

0 commit comments

Comments
 (0)