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 / January 2005

Tip: Looking for answers? Try searching our database.

References to WINWORD.EXE still alive.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robin Tucker - 17 Jan 2005 19:05 GMT
Hi,

I am diligently releasing (Marshal.ReleaseComObject (o) ) all references I
pick up while generating a report using VB.NET in my software.  At least, I
*think* I am.  However, when I have finished using the WINWORD.EXE com
server, I still have a reference to it hanging somewhere in my code (I know
this because it remains in task manager).  I have checked and double checked
but can't find it (although of course I am sure it must be there somewhere).
So my question is: are there any tools or is there any programmatic method I
can use to determine whether or not I have any references to this process
alive as a result of my code?

Oddly, even after I quit my program, WINWORD.EXE remains in memory.
However, if after creating my report, viewing it and then manually closing
WORD I check the task manager, it has mysteriously gone. Should I therefore
always call "quit" on the application object model, or will just releasing
the reference to it suffice?

Thanks for any information you can give me.

Robin.
Lance Wynn - 17 Jan 2005 20:33 GMT
You should always call Quit.
Because it's an out of process server, rather than an in-process server,
releasing references will not unload the application, you will need to
explicitly call the quit.  Be careful that winword isn't prompting for user
input too, this will cause it to hang and not unload.

Hi,

I am diligently releasing (Marshal.ReleaseComObject (o) ) all references I
pick up while generating a report using VB.NET in my software.  At least, I
*think* I am.  However, when I have finished using the WINWORD.EXE com
server, I still have a reference to it hanging somewhere in my code (I know
this because it remains in task manager).  I have checked and double checked
but can't find it (although of course I am sure it must be there somewhere).
So my question is: are there any tools or is there any programmatic method I
can use to determine whether or not I have any references to this process
alive as a result of my code?

Oddly, even after I quit my program, WINWORD.EXE remains in memory.
However, if after creating my report, viewing it and then manually closing
WORD I check the task manager, it has mysteriously gone. Should I therefore
always call "quit" on the application object model, or will just releasing
the reference to it suffice?

Thanks for any information you can give me.

Robin.
Crouchie1998 - 18 Jan 2005 00:29 GMT
Yes, objWord.Quit for example & then to double-check objWord = Nothing

Obviously, I am using objWord as a variable to explain a point. You should
change it to whatever you've called it

> You should always call Quit.
> Because it's an out of process server, rather than an in-process server,
[quoted text clipped - 23 lines]
>
> Robin.

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.