Hi,
I have have a .NET application that is running out of memory. We suspect a
memory leak in one of the COM components the application is calling. To try
to isolate this, I thought I would try running the COM DLLs out-of-process in
the standard surrogate, DLLHOST.EXE. To do this, I've created a new GUID,
used this to add an AppID entry under HKCR/AppID, added an empty DllSurrogate
REG_SZ, and linked the COM component's HKCR/CLSID key to the newly created
AppID through an AppID REG_SZ. However, the COM component is still being
loaded in process - there are no DLLHOST.EXE processes created at all when I
debug my .NET application. I've even tried using dcomcnfg to tell the COM
component to run as a different user, but I still don't get a DLLHOST.EXE
process.
Can anyone tell me what I'm doing wrong? Is it possible to force an in
process COM DLL to run out-of-process when it is being called from a .NET
application?
Also, while I'm here, does anyone know if it's possible to get Visual Studio
.NET 2003 to show COM DLLs in the modules window? Or indeed how to step into
such a DLL in the dissembly view?
Thanks,
- Lee
"Peter Huang" [MSFT] - 15 Sep 2005 02:57 GMT
Hi
Here is a link about how to run the dll in a separate process.
How to Isolate a DLL into a Separate Process By Using Component Services
(281335)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;281335
You may have a try. Common the COM client(whether .NET or vb6) will not
affect the COM+ behavior.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Lee Chapman - 15 Sep 2005 14:07 GMT
Thanks very much - that worked perfectly.
- Lee
"Peter Huang" [MSFT] - 16 Sep 2005 03:48 GMT
Hi Lee,
I am glad that my suggestion helps you.
You are welcomed!
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.