Win32:什么是 HRESULT 0x80070002?
我找不到 HRESULT: 0x80070002 的定义
我通常可以通过搜索包含路径找到这些定义,但找不到此代码。有人能解释一下它是什么吗?我认为它是从壳里出来的。
谢谢。
I can't find the definition of HRESULT: 0x80070002
I can usually find these searching the include paths but this code was not found. Does anyone have the explanation of what it is? I think it is coming from the shell.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
0x80070002
是HRESULT
格式的 Win32 错误代码 2 (ERROR_FILE_NOT_FOUND
),由HRESULT_FROM_WIN32()
宏。如有疑问,您可以使用
HRESULT_FACILITY()
和HRESULT_CODE()
宏可帮助您了解HRESULT
代表什么。在本例中,
0x80070002
的设施为 7 (FACILITY_WIN32
),这意味着代码 (2) 是 Win32 错误代码 (ERROR_FILE_NOT_FOUND
)。0x80070002
is the Win32 error code 2 (ERROR_FILE_NOT_FOUND
) inHRESULT
format, as returned by theHRESULT_FROM_WIN32()
macro.When in doubt, you can use the
HRESULT_FACILITY()
andHRESULT_CODE()
macros to help you figure out what anHRESULT
stands for.In this case,
0x80070002
has a facility of 7 (FACILITY_WIN32
), meaning the code (2) is a Win32 error code (ERROR_FILE_NOT_FOUND
).errlook.exe 说“系统找不到指定的文件”。 ,同意它不在任何 SDK(或 VS2019)标头中。
errlook.exe says it is "The system cannot find the file specified." , agreed that it is not in any of the SDK (or VS2019) headers.
在 IIS 中删除并添加服务(WebSite) 修复了我的错误。
可能是服务路径自上次添加到 IIS 后不正确。
添加网站时,请确保将正确的物理路径传递给 IIS。
Removing and adding the service(WebSite) back in IIS fixed the error for me.
It might have been the case of the service path being incorrect since it was last added in IIS.
Make sure you're passing the correct physical path to IIS when adding the a web site.