Пример #1
0
 private RpcFaultException(SafeStructureInOutBuffer <LRPC_FAULT_MESSAGE> buffer, LRPC_FAULT_MESSAGE message)
     : this(message.RpcStatus)
 {
     ExtendedErrorInfo = new RpcExtendedErrorInfo[0];
     if (message.Flags.HasFlag(LRPC_FAULT_MESSAGE_FLAGS.ExtendedErrorInfo))
     {
         try {
             byte[] data = buffer.GetStructAtOffset <LRPC_FAULT_MESSAGE_EXTENDED>(0).Data.ToArray();
             ExtendedErrorInfo = RpcExtendedErrorInfo.ReadErrorInfo(data);
         } catch {
         }
     }
 }
 internal RpcFaultException(PDUFault fault) : this(fault.Status)
 {
     if (fault.ExtendedErrorData != null)
     {
         try
         {
             ExtendedErrorInfo = RpcExtendedErrorInfo.ReadErrorInfo(fault.ExtendedErrorData);
         }
         catch
         {
         }
     }
 }
 private RpcFaultException(SafeStructureInOutBuffer <LRPC_FAULT_MESSAGE> buffer, LRPC_FAULT_MESSAGE message)
     : this(message.RpcStatus)
 {
     ExtendedErrorInfo = new RpcExtendedErrorInfo[0];
     if (message.Flags.HasFlag(LRPC_FAULT_MESSAGE_FLAGS.ExtendedErrorInfo))
     {
         try
         {
             byte[] data = buffer.Data.ReadBytes(16, buffer.Data.Length - 16);
             ExtendedErrorInfo = RpcExtendedErrorInfo.ReadErrorInfo(data);
         }
         catch
         {
         }
     }
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="rpc_status">The RPC status code.</param>
 public RpcFaultException(int rpc_status)
     : base(NtObjectUtils.MapDosErrorToStatus(rpc_status))
 {
     ExtendedErrorInfo = new RpcExtendedErrorInfo[0];
 }