debugging an inproc com server running in dllhost.

2019-07-03 12:38发布

I am writing an inproc com dll that runs in the dllhost.exe surrogate, but I am running into an issue debugging it.

if there were multiple dllhost.exe's running at once, it would be annoying to find the right one to attach a debugger to. Is there an easy way to identify yours if a lot are running?

Thanks

标签: c++ windows com
2条回答
Ridiculous、
2楼-- · 2019-07-03 13:27

Process explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653) has convenient feature that allows you to look at which processes have loaded which DLLs. You can also do a search for DLLs in all running processes.

Sysinternals also has a command line utility called ListDLLs (http://technet.microsoft.com/en-us/sysinternals/bb896656) that should work for you.

Once you find the PID of the process that has your DLL, you can attach to it.

查看更多
Juvenile、少年°
3楼-- · 2019-07-03 13:32

There's an alternative strategy. Just don't try to identify which to attach to. Set a breakpoint in your code and attach to all dllhost.exe processes - when a breakpoint is hit that process will pause under debugger.

查看更多
登录 后发表回答