Zombie COM Surrogate (WinInetCacheServer) processes when running MAPI in a 64-bit MFC Application via Task Scheduler

Dave 206 Reputation points
2024-10-11T05:58:27.6133333+00:00

I have a 32-bit C++ MFC Windows application that calls MAPI via the Windows MAPI API. Recently, I compiled the application to 64-bit, and it runs fine when launched manually. However, when I schedule the same 64-bit version to run via Windows Task Scheduler, every time the task runs, a COM Surrogate (dllhost.exe) process is created and doesn't exist, so I end up with many instances of this process. This doesn't happen under Task Scheduler when running the 32-bit build. It also doesn't happen when the MAPI client (Outlook.exe) is unavailable.

Using Process Explorer, I found that the CLSID responsible is 3EB3C877-1F16-487C-9050-104DBCD66683:

C:\Windows\system32\DllHost.exe /Processid:{3EB3C877-1F16-487C-9050-104DBCD66683}

This CLSID shows up as WinInetCacheServer when searching the registry. This seems to indicate that MAPI, via my application, is triggering network or cache-related operations that are being handled by the COM Surrogate and it's not cleaning up after itself.

  • Why does running the task under Task Scheduler trigger the WinInetCacheServer COM Surrogate, and not when run manually?
  • Is there a way to prevent Task Scheduler from invoking the COM Surrogate process, or control its behavior?
  • Could MAPI or other network-related calls in my application be causing this, and how do I manage it properly in a 64-bit context?

Any advice on how to fix this issue would be greatly appreciated!

Outlook | Windows | Classic Outlook for Windows | For business
Developer technologies | C++
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.