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.

Problem in calling a COM dll function from C# .Net Web method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PMH - 21 Sep 2006 07:16 GMT
Hello,
   I have created a COM DLL which has one functionality exposed through
interface.
 Now in my Web Application I made the reference to that DLL.
I created the object and called the funtion.

But after calling the function i assigned the object to null.

Problem is refence is not getting destroyed... After closing the application
also i will not be able to move the DLL... since it has the reference to the
object..

One more interesting thing is that if I restart the IIS the reference gets
destroyed (Only in .Net 2003, not in VS .Net 2005)

Can any body help me in this regard? (on how to make the reference null?)

Regards,
Mahesh H P
PMH - 21 Sep 2006 07:22 GMT
One thing i forgot to mention.. the COM DLL was created using VC++ .

Mahesh H P
Dmytro Lapshyn [MVP] - 22 Sep 2006 08:18 GMT
Hi,

Try calling Marshal.ReleaseComObject on the reference before setting it to
null. Note that this call will invalidate ALL references to this instance of
the COM object.

Signature

Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL

> Hello,
>    I have created a COM DLL which has one functionality exposed through
[quoted text clipped - 17 lines]
> Regards,
> Mahesh H P

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.