Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / September 2005

Tip: Looking for answers? Try searching our database.

How to force in-proc DLL to run out-of-process?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee Chapman - 14 Sep 2005 18:50 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.