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 2006

Tip: Looking for answers? Try searching our database.

Cannot destroy DCOM object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tilbyj@hotmail.com - 12 Sep 2006 14:19 GMT
Hello,

I am new to .NET, and am trying to write an application that connects
to a DCOM server that we use. Wonderfully (unlike with ASP) I can now
import the type library for my DCOM server, and have my code checked at
compile time.

However, I have a problem destroying my objects created on the DCOM
server. I create them as follows:

    lssServerType = Type.GetTypeFromProgID( "MyServer.SSServer");

    lsoSSServer = Activator.CreateInstance(lssServerType);

This works perfectly. (I have also tried using the "new" keyword, which
also works perfectly). To destroy the object (within the same
function), I use:

    liRefCount = Marshal.ReleaseComObject (lsoSSServer);

I can see that liRefCount is zero after this call. However, resources
are not released on the DCOM server.

It might help to know that I have old-style ASP code which creates the
same object using CreateObject. When the reference to the object is set
to null in the ASP code, the object is completely destroyed on the DCOM
server.

Thanks for any help you can give!

James
tilbyj@hotmail.com - 12 Sep 2006 16:39 GMT
Just ignore this please - I have resolved the problem now. It was
nothing to do with .NET but the way I was using the DCOM server.

Thanks

James

Rate this thread:







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.