1515using NtApiDotNet . Ndr . Marshal ;
1616using System ;
1717using System . Collections . Generic ;
18+ using System . Linq ;
1819
1920namespace NtApiDotNet . Win32 . Rpc . Transport
2021{
@@ -153,7 +154,7 @@ private void ClearAttributes(AlpcMessage msg, AlpcReceiveMessageAttributes attri
153154 _client . Send ( AlpcMessageFlags . None , msg , attributes . ToContinuationAttributes ( flags ) , NtWaitTimeout . Infinite ) ;
154155 }
155156
156- private RpcClientResponse SendAndReceiveLarge ( int proc_num , Guid objuuid , byte [ ] ndr_buffer , IReadOnlyCollection < NtObject > handles )
157+ private RpcClientResponse SendAndReceiveLarge ( int proc_num , Guid objuuid , byte [ ] ndr_buffer , IReadOnlyCollection < NdrSystemHandle > handles )
157158 {
158159 LRPC_LARGE_REQUEST_MESSAGE req_msg = new LRPC_LARGE_REQUEST_MESSAGE ( )
159160 {
@@ -177,7 +178,7 @@ private RpcClientResponse SendAndReceiveLarge(int proc_num, Guid objuuid, byte[]
177178
178179 if ( handles . Count > 0 )
179180 {
180- send_attr . AddHandles ( handles ) ;
181+ send_attr . AddHandles ( handles . Select ( h => new AlpcHandleMessageAttributeEntry ( h . Handle , h . DesiredAccess ) ) ) ;
181182 }
182183
183184 using ( var port_section = _client . CreatePortSection ( AlpcCreatePortSectionFlags . Secure , ndr_buffer . Length ) )
@@ -199,7 +200,7 @@ private RpcClientResponse SendAndReceiveLarge(int proc_num, Guid objuuid, byte[]
199200 }
200201 }
201202
202- private RpcClientResponse SendAndReceiveImmediate ( int proc_num , Guid objuuid , byte [ ] ndr_buffer , IReadOnlyCollection < NtObject > handles )
203+ private RpcClientResponse SendAndReceiveImmediate ( int proc_num , Guid objuuid , byte [ ] ndr_buffer , IReadOnlyCollection < NdrSystemHandle > handles )
203204 {
204205 LRPC_IMMEDIATE_REQUEST_MESSAGE req_msg = new LRPC_IMMEDIATE_REQUEST_MESSAGE ( )
205206 {
@@ -221,7 +222,7 @@ private RpcClientResponse SendAndReceiveImmediate(int proc_num, Guid objuuid, by
221222
222223 if ( handles . Count > 0 )
223224 {
224- send_attr . AddHandles ( handles ) ;
225+ send_attr . AddHandles ( handles . Select ( h => new AlpcHandleMessageAttributeEntry ( h . Handle , h . DesiredAccess ) ) ) ;
225226 }
226227
227228 using ( AlpcReceiveMessageAttributes recv_attr = new AlpcReceiveMessageAttributes ( ) )
@@ -329,7 +330,7 @@ public void Bind(Guid interface_id, Version interface_version, Guid transfer_syn
329330 /// <param name="handles">List of handles marshaled into the buffer.</param>
330331 /// <returns>Client response from the send.</returns>
331332 public RpcClientResponse SendReceive ( int proc_num , Guid objuuid , NdrDataRepresentation data_representation ,
332- byte [ ] ndr_buffer , IReadOnlyCollection < NtObject > handles )
333+ byte [ ] ndr_buffer , IReadOnlyCollection < NdrSystemHandle > handles )
333334 {
334335 if ( ndr_buffer . Length > 0xF00 )
335336 {
0 commit comments