Remote debugging C++ on the Windows Server 2008 platform with VS2010; MSVCP100D.dll missing

安稳与你 提交于 2019-12-13 03:38:09

问题


I've written a quick C++ console app using VS2010. I'd like to run it via the remote debugger on the Windows Server 2008 platform, in order to determine why I can't enumerate the CLSID_AudioInputDeviceCategory on that OS.

The console app works on the XP and W7 platforms.

The remote debugger gives the following error when I first tried to run the console app:

The program can't start because MSVCP100D.dll is missing from your computer.  Try reinstalling the program to fix the problem.

I did try just copying this DLL from my development machine to the target folder on the remote machine, but it returned an even more obscure message:

The application was unable to start correctly (0xc0000007b).  Click OK to close the application.

I've tried installing the VS2010 C++ re-distributable on the target host. This has no effect. I'm out of ideas, does anyone have any suggestions?

Having spent some time on this problem, I've noticed that the Windows Audio service on server 2008 was disabled, but my query is more to do with getting remote debugging working on the server 2008 platform than solving my audio hardware enumeration problem.


回答1:


Thanks to Errata, I had a look at

Project Properties -> Configuration Properties -> C++ -> Code Generation

I changed Runtime Library from Multi-threaded Debug DLL to Multi-threaded Debug (/MTd).

This allows remote debugging without having to rely on the correct debug DLLs residing on the remote machine.

I hope this helps someone out there!




回答2:


I had this exact situation. I grabbed copies of MSVCP100D.dll and MSVCR100D.dll. However I grabbed them from system32 (the 32-bit version), which resulted in the 0xc0000007b error.

0xc0000007b apparently means invalid DLL, often architecture mismatch between program and DLL (i.e. x86 and x64). In my case I grabbed the wrong (32-bit) version of the DLL from my developement computer resulting in 0xc0000007b. After grabbing the file from SysWOW64, it worked.



来源:https://stackoverflow.com/questions/5014712/remote-debugging-c-on-the-windows-server-2008-platform-with-vs2010-msvcp100d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!