在哪里可以找到所有 Windows 错误代码的列表?
在上一个问题中,我问当我的程序返回一个晦涩的值时意味着什么,比如
-1073741819
好吧,现在我得到另一个大的返回值,
-1073740777
我想知道是否有所有这些值的列表以及它们的含义某处?
In a previous question, I asked what it meant when my program returned an obscure value like
-1073741819
Well, now I'm getting another large return value,
-1073740777
And I would like to know if there is some list of all of these values and what they mean sopmewhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
这里有一个 100% 免费的在线工具“MagnumDB”,用于“Magical Number Database”,其中包含大约 350,000 个常量(整数、从整个 Windows SDK 文件(约 6,000 个文件)解析的字符串、guid 等),您可以按值和名称查询。 免责声明:我在多年搜索常量、名称、指导之后写了它......
这是 -1073741819 映射到3个不同文件中定义的3个不同常量(具有相同的值和相同的含义),最常见的是
STATUS_ACCESS_VIOLATION
。对于 -1073740777 来说,这是
STATUS_INVALID_CRUNTIME_PARAMETER< /code> 在
winnt.h
中定义。它支持整数、有符号整数、无符号整数、十六进制表示法以及原始文本搜索。 它还知道由操作定义的常量值(如 c2 = c1 + 1)。
Here is a 100% free online tool "MagnumDB" for "Magical Number Database" that contains about 350,000 constants (integers, strings, guids, etc.) parsed from the whole Windows SDK files (~6,000 files), that you can query by value and by name. Disclaimer: I wrote it after years of searching for constants, names, guids...
Here is the result for -1073741819 which maps to 3 different constants (with the same value and the same meaning) defined in 3 different files, the most common being
STATUS_ACCESS_VIOLATION
.And for -1073740777 which is
STATUS_INVALID_CRUNTIME_PARAMETER
defined inwinnt.h
.It supports integers, signed integers, unsigned integers, hexadecimal notation, and also raw text searches. It also knows the value of constants that are defined by operations (like c2 = c1 + 1).
由于 Windows 错误代码系统是可扩展的,因此没有一个地方可以查找所有可能的 Windows 错误代码。 但是,您可以从以下开始:
ERRLOOK
工具。 如果您使用的是 Visual Studio,请先尝试一下。Winerror.h
。 我提供了一个指向 MSDN 的链接,其中包含该头文件的内容。 或者您可以查看 上按编号列出的错误代码此页面。Winerror.h
或另一个头文件来获取实际值。find
(就像 Unixgrep
) 在平台 SDK 的Include
目录中查找整个错误代码的十六进制值,或仅代码部分的十进制值(即低 16 位)。 使用HRESULT_CODE
< /a> 来提取它。 请参阅上面的 COM 错误代码的结构。Because the Windows error code system is extensible, there is no single place to look up all possible Windows error codes. However, you can start with:
ERRLOOK
tool. Try that first if you're using Visual Studio.Winerror.h
. I've included a link to MSDN that contains the contents of that header file. Or you can look at the error code listing by number on this page.Winerror.h
, or an another header file to get the actual values.find
(like Unixgrep
) in theInclude
directory of the platform SDK for either the hex value of the entire error code, or the decimal value of just the code section--that is, the lower 16 bits. UseHRESULT_CODE
to extract that. See the Structure of COM Error Codes above.通常,如果以十六进制打印错误号,而不是带符号的十进制形式,您将获得更好的搜索结果。
例如,您的第一个错误是-1073741819,也可以用十六进制的0xC0000005表示。 这是一个“访问冲突”错误,谷歌很快就会告诉你。
Generally you will get better search results if you print out the error number in hex, instead of signed decimal form.
For example, your first error is -1073741819 which can also be represented by 0xC0000005 in hex. This is an "access violation" error as google will quickly tell you.
其中许多(但我认为与 COM 相关的不是)位于名为 winerror.h。
在(某些版本的)Visual Studio 中,在“
工具
”菜单下,您可能会找到名为“错误查找...
”的菜单项。Many of them (but not I think the ones related to COM) are in a header file named winerror.h.
In (some versions of) Visual Studio, under the '
Tools
' menu, you might find an menu item named 'Error Lookup...
'.NTSTATUS
NTSTATUS *涵盖一系列设施
FACILITY_URT (0x013) *CLR 异常
HRESULTS
FACILITY_NULL (0x000)
FACILITY_RPC (0x001)
FACILITY_DISPATCH (0x002)
FACILITY_RPC_STUBS (0x003)
FACILITY_USER (0x004) *多个库可以重复使用相同的错误代码
FACILITY_MCA_ERROR_CODE (0x005)
FACILITY_WIN32,MSDN (0x007) *标准 WINAPI 错误代码
FACILITY_WINDOWS (0x008)
FACILITY_SECURITY (0x009)
FACILITY_CERT (0x00B)
FACILITY_INTERNET (0x00C)
FACILITY_MEDIASERVER (0x00D)
FACILITY_MSMQ (0x00E)
FACILITY_SETUPAPI (0x00F)
FACILITY_SCARD (0x010)
FACILITY_COMPLUS (0x011)
FACILITY_HTTP (0x019)
FACILITY_USERMODE_FILTER_MANAGER (0x01F)
FACILITY_WINDOWSUPDATE (0x024)
FACILITY_GRAPHICS (0x026)
FACILITY_NAP (0x027)
FACILITY_INK (0x028)
FACILITY_TPM_SOFTWARE (0x029)
FACILITY_UI (0x02A)
FACILITY_PLA (0x030)
FACILITY_FVE (0x031)
FACILITY_FWP (0x032)
FACILITY_WINRM (0x033)
FACILITY_NDIS (0x034)
FACILITY_USERMODE_HYPERVISOR (0x035)
FACILITY_USERMODE_VIRTUALIZATION (0x037)
FACILITY_USERMODE_VOLMGR (0x038)
FACILITY_BCD (0x039)
FACILITY_USERMODE_VHD (0x03A)
FACILITY_SDIAG (0x03C)
FACILITY_WEBSERVICES (0x03D)
FACILITY_WPN (0x03E)
FACILITY_MBN (0x054)
FACILITY_P2P (0x063)
FACILITY_BLUETOOTH_ATT (0x065)
FACILITY_AUDIO (0x066)
FACILITY_IMAPI2 (0x0AA)
FACILITY_RTC_INTERFACE (0x0EE)
FACILITY_SIP_STATUS_CODE (0x0EF)
FACILITY_PINT_STATUS_CODE (0x0F0)
FACILITY_MAX_WDSTPTMGMT (0x110)
FACILITY_WDSMCSERVER (0x121)
FACILITY_MAX_WDSMC (0x122)
FACILITY_MAX_WDSCP (0x125)
FACILITY_BACKUP (0x7FF)
FACILITY_NTDSB (0x800)
FACILITY_DIRECT3D10 (0x879)
FACILITY_DXGI (0x87A)
FACILITY_DXGI_DDI (0x87B)
FACILITY_DIRECT3D11 (0x87C)
FACILITY_DWRITE (0x898)
FACILITY_D2D (0x899)
FACILITY_DEFRAG (0x900)
FACILITY_ONLINE_ID (0xA02)
错误检查
错误检查代码参考 *又名蓝屏
NTSTATUS
NTSTATUS *covers a range of facilities
FACILITY_URT (0x013) *CLR exceptions
HRESULTS
FACILITY_NULL (0x000)
FACILITY_RPC (0x001)
FACILITY_DISPATCH (0x002)
FACILITY_RPC_STUBS (0x003)
FACILITY_USER (0x004) *multiple libraries can reuse the same error code
FACILITY_MCA_ERROR_CODE (0x005)
FACILITY_WIN32, MSDN (0x007) *standard WINAPI error codes
FACILITY_WINDOWS (0x008)
FACILITY_SECURITY (0x009)
FACILITY_CERT (0x00B)
FACILITY_INTERNET (0x00C)
FACILITY_MEDIASERVER (0x00D)
FACILITY_MSMQ (0x00E)
FACILITY_SETUPAPI (0x00F)
FACILITY_SCARD (0x010)
FACILITY_COMPLUS (0x011)
FACILITY_HTTP (0x019)
FACILITY_USERMODE_FILTER_MANAGER (0x01F)
FACILITY_WINDOWSUPDATE (0x024)
FACILITY_GRAPHICS (0x026)
FACILITY_NAP (0x027)
FACILITY_INK (0x028)
FACILITY_TPM_SOFTWARE (0x029)
FACILITY_UI (0x02A)
FACILITY_PLA (0x030)
FACILITY_FVE (0x031)
FACILITY_FWP (0x032)
FACILITY_WINRM (0x033)
FACILITY_NDIS (0x034)
FACILITY_USERMODE_HYPERVISOR (0x035)
FACILITY_USERMODE_VIRTUALIZATION (0x037)
FACILITY_USERMODE_VOLMGR (0x038)
FACILITY_BCD (0x039)
FACILITY_USERMODE_VHD (0x03A)
FACILITY_SDIAG (0x03C)
FACILITY_WEBSERVICES (0x03D)
FACILITY_WPN (0x03E)
FACILITY_MBN (0x054)
FACILITY_P2P (0x063)
FACILITY_BLUETOOTH_ATT (0x065)
FACILITY_AUDIO (0x066)
FACILITY_IMAPI2 (0x0AA)
FACILITY_RTC_INTERFACE (0x0EE)
FACILITY_SIP_STATUS_CODE (0x0EF)
FACILITY_PINT_STATUS_CODE (0x0F0)
FACILITY_MAX_WDSTPTMGMT (0x110)
FACILITY_WDSMCSERVER (0x121)
FACILITY_MAX_WDSMC (0x122)
FACILITY_MAX_WDSCP (0x125)
FACILITY_BACKUP (0x7FF)
FACILITY_NTDSB (0x800)
FACILITY_DIRECT3D10 (0x879)
FACILITY_DXGI (0x87A)
FACILITY_DXGI_DDI (0x87B)
FACILITY_DIRECT3D11 (0x87C)
FACILITY_DWRITE (0x898)
FACILITY_D2D (0x899)
FACILITY_DEFRAG (0x900)
FACILITY_ONLINE_ID (0xA02)
Bug Checks
Bug Check Code Reference *aka Blue Screens
好吧,这里有很多,
http://msdn.microsoft.com/en-us/library/ms681381(VS.85).aspx
但是当我得到像你的例子这样的一个时,我只是谷歌这个数字。
Well there's a bunch of them here,
http://msdn.microsoft.com/en-us/library/ms681381(VS.85).aspx
But when I get one like your example I just Google the number.
下面是
C#
中的一个类,可帮助您将错误代码转换为字符串
:Here's a class in
C#
to help you convert the error codes tostring
: