背景:我试图将在Windows 7计算机上开发的Qt应用程序部署到另一台没有安装Qt框架的Windows 7计算机上。我跟着these instructions,虽然稍微修改了,因为我使用的是MSVC13而不是MinGW。我的程序将无法在非Qt计算机上运行 - 我收到一条Windows错误消息,指出应用程序无法初始化。我在我的.exe上运行了Dependency Walker,无论是在工作机器还是非工作机器上。它会报告每个警告,但两台计算机之间的警告是相同的,因此它并没有真正告诉我任何事情。
我还在两台计算机上以配置文件模式运行了Dependency Walker。问题是系统PATH在两者之间是不同的,我怀疑这就是为什么它在一台计算机上运行而不在另一台计算机上运行的原因,即它在我的PATH文件夹中找到了缺少的依赖项。我的问题是如何防止Dependency Walker在分析期间搜索PATH中的文件夹,以便我可以在工作计算机上重现错误。在进行静态依赖性分析时似乎有一个选项,而不是动态分析(分析)。
我已经包含了以下非工作计算机的配置文件输出。我无法看到导致其崩溃的明显因素......也许其他人可以提供更多洞察力。 MIBC.exe是我的可执行文件。
Started "MIBC.EXE" (process 0x990) at address 0x000000013FFA0000. Successfully hooked module.
Loaded "NTDLL.DLL" at address 0x0000000077140000. Successfully hooked module.
Loaded "KERNEL32.DLL" at address 0x0000000076F20000. Successfully hooked module.
Loaded "KERNELBASE.DLL" at address 0x000007FEFD1D0000. Successfully hooked module.
DllMain(0x000007FEFD1D0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "KERNELBASE.DLL" called.
DllMain(0x000007FEFD1D0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "KERNELBASE.DLL" returned 1 (0x1).
DllMain(0x0000000076F20000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "KERNEL32.DLL" called.
DllMain(0x0000000076F20000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "KERNEL32.DLL" returned 1073348865 (0x3FFA0101).
Injected "DEPENDS.DLL" at address 0x000000006F2C0000.
Loaded "ADVAPI32.DLL" at address 0x000007FEFD780000. Successfully hooked module.
Loaded "MSVCRT.DLL" at address 0x000007FEFEFC0000. Successfully hooked module.
Loaded "SECHOST.DLL" at address 0x000007FEFD400000. Successfully hooked module.
Loaded "RPCRT4.DLL" at address 0x000007FEFD420000. Successfully hooked module.
DllMain(0x000000006F2C0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "DEPENDS.DLL" called.
DllMain(0x000000006F2C0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "DEPENDS.DLL" returned 1 (0x1).
DllMain(0x000007FEFEFC0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "MSVCRT.DLL" called.
DllMain(0x000007FEFEFC0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "MSVCRT.DLL" returned 1 (0x1).
DllMain(0x000007FEFD420000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "RPCRT4.DLL" called.
DllMain(0x000007FEFD420000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "RPCRT4.DLL" returned 4249117697 (0xFD446401).
DllMain(0x000007FEFD400000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "SECHOST.DLL" called.
DllMain(0x000007FEFD400000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "SECHOST.DLL" returned 1 (0x1).
DllMain(0x000007FEFD780000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "ADVAPI32.DLL" called.
DllMain(0x000007FEFD780000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "ADVAPI32.DLL" returned 4253200129 (0xFD82AF01).
Exited "MIBC.EXE" (process 0x990) with code -1073740956 (0xC0000364).
编辑:我现在看到代码0xC0000364意味着"访问被其他策略禁用",所以这个问题可能是由于两台计算机之间的组策略不同造成的。