Exception.HResult 属性

HRESULT详解
本文详细介绍了HRESULT的组成部分及其作用。HRESULT是一个32位值,包括严重性代码、功能代码和错误代码三部分。严重性代码用于指示返回值是信息、警告还是错误;功能代码标识导致错误的系统区域;错误代码则是表示异常的唯一编号。
 
HRESULT 是 32 位值,分为三个不同的域:严重性代码、功能代码和错误代码。严重性代码指示返回值是表示信息、警告还是错误。功能代码标识负责该错误的系统区域。错误代码是所分配的、表示异常的唯一编号。每个异常都映射到一个不同的 HRESULT。当托管代码引发异常时,运行库将 HRESULT 传递给 COM 客户端。当非托管代码返回错误时,相应的 HRESULT 被转换为异常,然后由运行库引发该异常。
 
说明:由于未经处理的异常,进程终止。 异常信息:System.ComponentModel.Win32Exception 在 Standard.HRESuLT.ThrowIfFailed(System.String) 在Standard.HRESULT.ThrowLastError() 在Standard.NativeMethods.GetWindowRect (IntPtr) 在System.Windows.Shell.WindowChromeWorker.GetEffectiveClientArea(RECTByRef) 异常信息:System.Reflection.TargetInvocationException 在System.RuntimeMethodhandle.InvokeMethod(System.Object,System.Object[l,System.Signature,Boolean) 在System.Reflection.RuntimeMethodinfo.Unsafeinvokeinternal(System.Object, System.Object[],System.Object[]) 在System.Reflection.RuntimeMethodInfo.Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) seflection.MethodBase.nvokeystem.bjecsystem.bject[]) 在 车s System.Windows.Interop.HwndMouseInputProvider.HasCustomChrome (System.Windows.Interop.HwndSource, RECT ByRef) 在: System.Windows.Interop.HwndMouseInputProvider.GetEffectiveClientRect (IntPtr) 在 Systemwindowsnterop.hwndmousenptrovider.ossiblyDeactivaentrBooean) 在System.Windows.Interop.HwndmouseInputProvider.FilterMessage(IntPtr,Ms.nternal.Interop.Windowmessage,IntPtr,IntPtrBooleanByRef) 在System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32,IntPtr,IntPtr, Boolean ByRef) 在MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 在MS.Win32.HwndSubclass.Dispatchercallbackoperation(System.Object) System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate,System.Object,Int32) system.windowreadingxeiaer.rahenstcsemelegatesstembcnselgat ysmwidowhreadinipargacvokwindowadiisahrriasylgat 在 在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr,Int32,IntPtr,IntPtr) 在System.windows.Threading.Dispatcher.pushFramempl(System.windows.Threading.dispatcherrame 在System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) System.Windows.Application.RunDispatcher (System.Object) 在System.Windows.Application.RunInternal (System.Windows.Window) 在System.Windows.Application.Run(System.Windows.Window) System.Windows.Application.Run() 在 Fighting AutoScan.App.Main()
09-18
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值