releasing a Com Server reference from Vb.Net 
Author Message
 releasing a Com Server reference from Vb.Net

Hi

If I reference an external COM server within my Vb.net application how
can I force the net runtime to release the object when I set it to
nothing?

The specific COM server is an OPCserver that I am browsing but the the
principle should be application to all COM servers I am assuming.
I have seen an example of forcing the COM object to nothing but cannot
find it anywhere.

Many thanks in advance

Paul

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Fri, 28 Jan 2005 21:39:39 GMT  
 releasing a Com Server reference from Vb.Net
Use Marshal.ReleaseComObject from the System.InteropServices namespace

Cheers

--
Robert Chapman
Manager, Applications Development
prairieFyre Software Inc.
http://www.prairiefyre.com

Quote:
> Hi

> If I reference an external COM server within my Vb.net application how
> can I force the net runtime to release the object when I set it to
> nothing?

> The specific COM server is an OPCserver that I am browsing but the the
> principle should be application to all COM servers I am assuming.
> I have seen an example of forcing the COM object to nothing but cannot
> find it anywhere.

> Many thanks in advance

> Paul

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Fri, 28 Jan 2005 22:14:50 GMT  
 releasing a Com Server reference from Vb.Net
Great..Thanks a lot


Quote:
> Use Marshal.ReleaseComObject from the System.InteropServices namespace

> Cheers

> --
> Robert Chapman
> Manager, Applications Development
> prairieFyre Software Inc.
> http://www.prairiefyre.com


> > Hi

> > If I reference an external COM server within my Vb.net application how
> > can I force the net runtime to release the object when I set it to
> > nothing?

> > The specific COM server is an OPCserver that I am browsing but the the
> > principle should be application to all COM servers I am assuming.
> > I have seen an example of forcing the COM object to nothing but cannot
> > find it anywhere.

> > Many thanks in advance

> > Paul

> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!



Sat, 29 Jan 2005 03:14:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB won't release reference to COM object in use by another proces s

2. Automation error referencing .net dll from com (com interop)

3. Data Link Dialog in VB.NET without COM reference

4. Howto: get reference to VB COM server object??

5. Releasing SpeechLib COM via .NET DLL

6. VB.NET crashing from my com server events

7. Memory not released with vb.net and cr.net

8. VB COM project reference works, but dll reference does not

9. VB.DOC 0.25 has been released - XML comments for VB.NET

10. VB.DOC 0.21 released: XMK comments for VB.NET

11. Calling COM EXE from VB.NET Service leaves COM EXE in Memory

12. COM-Gen 2000 - Build 107 released - generates COM objects

 

 
Powered by phpBB® Forum Software