dia2dump:CoCreateInstance 失败 - HRESULT = 80040154 [英] dia2dump: CoCreateInstance failed - HRESULT = 80040154
问题描述
我正在尝试使用 Visual Studio 2017 及其 dia2dump.我加载了 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\Samples\DIA2Dump\DIA2Dump.sln
.它构建成功:
I'm trying to dump the signature of a PDB on Windows 7 x64 using Visual Studio 2017 and its dia2dump. I loaded C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\Samples\DIA2Dump\DIA2Dump.sln
. It built successfully:
1>------ Rebuild All started: Project: Dia2Dump, Configuration: Debug x64 ------
1>stdafx.cpp
1>regs.cpp
1>PrintSymbol.cpp
1>dia2dump.cpp
1>Generating Code...
1>Dia2Dump.vcxproj -> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\Samples\DIA2Dump\x64\Debug\Dia2Dump.exe
1>Dia2Dump.vcxproj -> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\Samples\DIA2Dump\x64\Debug\Dia2Dump.pdb (Partial PDB)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
当我在 PDB 上运行它时,出现以下错误:
When I run it on the PDB, I get the following error:
C:\>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\Samples\DIA2Dump\x64\Debug\Dia2Dump.exe" file.pdb
CoCreateInstance failed - HRESULT = 80040154
为了以防万一,我运行了以下并成功,但 dia2dump 失败并出现相同的错误(重启后也是如此):
Just in case, I ran the following and it was successful, but dia2dump failed with the same error (also after reboot):
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\VC\msdia100.dll"
我该如何调试?
推荐答案
x64 类未注册.您需要使用 x64 位
msdiaXXX.dll
RbMm 已经将正确答案作为评论发布了.但如果有人面临同样的问题:要注册 64 位 DLL,您需要使用 C:/Windows/SYSWOW64
文件夹中的 regsvr32.exe
!微软应该把它命名为 regsvr64.exe
...
RbMm posted the correct answer as comment already. But if someone faces the same problem: To register a 64-bit-DLL you need to use the regsvr32.exe
from the C:/Windows/SYSWOW64
folder! Microsoft should have named it regsvr64.exe
...
这篇关于dia2dump:CoCreateInstance 失败 - HRESULT = 80040154的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!