使用任务管理器(Task Manager)查看 Windows(Windows)计算机上的进程列表是偏执的秘诀。有很多听起来很奇怪的程序正在运行,您通常无法知道什么对您的 PC 有利或不利。COM代理 dllhost.exe 只是这样一个进程,但它比您想象的要普通得多。
什么是 COM代理(Surrogate)(dllhost.exe)?
COM是Component Object Model的缩写。这是微软(Microsoft)在 90 年代初引入的东西,目的是让程序员可以轻松地扩展现有软件的功能。换句话说,它有点像一个插件系统,可让您向现有程序(如Windows Explorer )添加新功能。
这对于动态改进程序的功能非常有用,但也有缺点。如果COM模块由于某种原因编码错误或崩溃,它也会导致它插入的程序崩溃。这是因为COM和主程序都作为一个进程运行。
这就是COM代理的用武之地。这种方法让COM在自己的单独进程中运行,就好像它是自己的程序一样。主程序和COM代理进程根据需要相互通信。但是,如果COM代理因任何原因崩溃,除了它自己的进程之外,它不会导致任何事情崩溃。这使得整个系统更加稳定。
COM 代理(COM Surrogate)(dllhost.exe)安全(Safe)吗?
dllhost.exe是否(Whether)安全是一个难以回答的问题,因为它取决于正在运行的特定COM。通常,它们会托管执行有用操作的良性进程,但编码错误的COM或搭载在COM代理框架上的恶意软件可能会造成损害或执行恶意代码。
查找 COM 代理人的位置
dllhost.exe 文件只有一个合法位置,位于Windows文件夹内的(Windows)System32文件夹内。默认路径是系统驱动器上的Windows > System32 。系统驱动器通常是 C 驱动器。如果您在其他任何地方找到此文件,则可能是病毒。所以一定要扫一扫!
检查 COM 代理的合法性
如上所述,您在任务管理器中看到的(Task)COM代理不是特定的应用程序,它只是另一个进程的外壳。由于我们无法轻松了解特定COM代理进程中实际运行的内容,因此检查可疑行为的唯一真正方法是使用防病毒程序。
当然,无论如何,您都应该定期运行您的防病毒程序,但如果您看到一个(antivirus program)COM代理占用了大量资源或导致系统不稳定,这可能是一种解释。
再说一次,有问题的COM代理进程可能只是错误的,而不是恶意的。如果您已保存所有文档,则可以尝试强制结束给定的COM代理进程以弄清楚它在做什么。杀死进程后直接崩溃或挂起的可能是相关程序。一旦确定了最有可能的罪魁祸首,您将需要重新启动计算机。
修复 COM 代理错误
COM代理错误时有发生,这可能是人们首先搜索进程名称的最常见原因。错误“ COM surrogate has stop working”起初可能看起来很神秘。既然您知道COM代理的作用,那么很明显该进程实际上正在完成它的工作。
COM代理旨在保护程序扩展不会使它们扩展的主进程崩溃,因此可以追溯到代理中运行的任何COM模块。
没有简单的方法可以知道它是哪个COM,因为代理本身掩盖了其中的特定COM。有几个可能的嫌疑人:
- 第三方视频编解码器已过时。如果有,请删除它们或更新它们。
- 您的防病毒程序可能会干扰COM代理项。暂时禁用它。如果这确实是问题所在,请切换到其他防病毒软件或尝试将您的防病毒软件更新到最新版本(如果适用)。
- 使用诸如CHKDSK之类的实用程序检查您的磁盘是否有错误。
- (Check)使用系统文件检查器(System File Checker)检查系统文件是否损坏。
- 尤其是回滚(Roll)最近的驱动程序更新或更新显示和打印机驱动程序。如果适用于您的计算机,请尝试标准制造商GPU 驱动程序(GPU driver)和OEM版本。(OEM)
如果您确实想知道如何准确诊断代理中正在运行的COM ,则有一个更具技术性的解决方案。(COM)
使用Process Explorer检查COM 代理进程内部(COM Surrogate Process)
Microsoft有一个称为Process Explorer的可选实用程序。它对各种事情都很有用。例如,如果您被告知可以删除某个文件夹,因为某个程序已打开该文件夹,您可以使用Process Explorer查看是哪个程序并强制将其关闭,而无需重新启动整个计算机。
只需(Simply)下载并运行Process Explorer,您将看到如下所示的窗口(Window):
请记住(Remember),COM Surrogate实际上称为 dllhost.exe。所以寻找那个并将鼠标指针悬停在条目上。在小弹出窗口中,您将看到托管的是哪个DLL文件。(DLL)通常这会给你足够的信息来知道哪个程序连接到它。如果从DLL(DLL)名称中不明显,您可以谷歌它以获得更明确的答案。
COM 结束派对
回顾一下,您现在知道COM(COMs)是什么、COM代理做什么、如何解决最常见的问题以及如何确定您正在处理的COM 。希望这(Which)已经彻底清除了您与COM相关的问题。
What Is COM Surrogate (dllhost.exe) and Why Is It Running on My PC?
Looking through the lіst of рrocessеs on a Windows computer using Task Manager is a recipe for paranoia. There are plenty of strange-sounding programs running and usually no way for you to know what’s good or bad for your PC. The COM surrogate dllhost.exe is just one such process, but it’s much more mundane than you may think.
What Is COM Surrogate (dllhost.exe)?
COM is short for Component Object Model. This is something Microsoft introduced in the early 90s to make it easy for programmers to extend the functionality of existing software. In other words, it’s somewhat like a plugin system that lets you add new functions to existing programs such as Windows Explorer.
This is great for dynamically improving what a program can do, but there’s a downside. If a COM module is badly coded or crashes for some reason, it also crashes the program that it plugs into. That’s because both the COM and main program are running as one process.
That’s where COM surrogates come in. This approach lets the COM run in its own separate process, as if it were its own program. The main program and COM surrogate processes speak to each other as needed. But if the COM surrogate crashes for any reason, it doesn’t cause anything but its own process to crash. That makes for a much more stable system overall.
Is COM Surrogate (dllhost.exe) Safe?
Whether dllhost.exe is safe is a tricky question to answer, because it will depend on the specific COM that’s running. Usually they host benign processes that do useful things, but it’s not outside the realm of possibility that a badly-coded COM or malware piggybacking on the COM surrogate framework could cause damage or execute malicious code.
Finding COM Surrogate’s Location
There’s only one legitimate location for the dllhost.exe file, and that’s inside the System32 folder within the Windows folder. The default path is Windows > System32 on the system drive. The system drive is usually the C drive. If you find this file anywhere else, it’s possibly a virus. So be sure to scan it!
Checking COM Surrogate’s Legitimacy
As mentioned above, the COM surrogate you’re seeing in Task manager isn’t a specific application, it’s just a shell for another process. Since we can’t easily get insight into what’s actually running within a specific COM surrogate process, the only real way to check for suspicious behavior is by using an antivirus program.
Of course, you should run your antivirus program at regular intervals anyway, but if you see a COM surrogate that is using up a lot of resources or causes system instability, that may be one explanation.
Then again, the COM surrogate process in question may just be buggy, rather than malicious. If you’ve saved all your documents, you can try forcibly ending a given COM surrogate process to figure out what it’s doing. Whatever crashes or hangs directly after killing the process is probably the associated program. Once you’ve got the most likely culprit identified, you’ll want to reboot your computer.
Fixing COM Surrogate Errors
COM surrogate errors happen from time to time and are probably the most common reason people search for the name of the process in the first place. The error “COM surrogate has stopped working” may seem cryptic at first. Now that you know what COM surrogate does, it’s obvious that the process is actually doing its job.
COM surrogate is meant to protect program extensions from crashing the main process they extend, so the cause of this error can be traced back to whatever COM module was running within the surrogate.
There’s no easy way to know which COM it was, since the surrogate itself masks the specific COM inside it. There are several likely suspects:
- Third-party video codecs are out of date. If you have any, either remove them or update them.
- Your antivirus program may be interfering with the COM surrogate. Disable it temporarily. If that does seem to be the problem, switch to a different antivirus or try updating yours to the latest version if applicable.
- Check your disk for errors using a utility such as CHKDSK.
- Check system files for corruption with the System File Checker.
- Roll back recent driver updates or update display and printer drivers in particular. Try both the standard manufacturer GPU driver and the OEM version, if that applies to your computer.
If you do want to know how to diagnose exactly which COM is running within the surrogate, there’s a more technical solution.
Checking Inside a COM Surrogate Process With Process Explorer
Microsoft has an optional utility known as Process Explorer. It’s useful for a variety of things. For example, if you’ve been told you can delete a folder because a program has it open, you can use Process Explorer to see which program that is and force it to close without having to restart the entire computer.
Simply download and run Process Explorer and you’ll see a Window like this:
Remember that COM Surrogate is actually called dllhost.exe. So look for that and hover the mouse pointer over the entry. In the little popup, you’ll see which DLL file is being hosted. Usually this gives you enough information to know which program is connected to it. If it’s not obvious from the DLL name, you can Google it for a more definite answer.
COM On Over for a Party
To recap, you now know what COMs are, what a COM surrogate does, how to fix the most common issues and how to figure out which COM you’re dealing with. Which, hopefully, has cleared your COM-related problems up for good.