AcroRd32.exe left open

Y

YYZ

In my app, I am displaying PDF files to the user. I'm using the COM
component "Adobe Acrobat 7.0 Browser Document" component. This works
great. Just open up my form, then have it tall the PDF control to
..LoadFile(sFileName) -- it displays and is great.

However, after closing the form, even closing the app, there is still a
process running (viewable by Task Manger processes tab) called
AcroRd32.exe -- am I supposed to do something to clear out the process?


I've actually seen this on other computers that don't even HAVE my app
installed on it, and this causes problems like Outlook not opening,
another app that we use (third party) crashing at odd times, and maybe
some other problems. This is why I don't want our app being a
contributor to this problem.

Any ideas from anyone? Is there a way to find out the process ID of
the AcroRd32.exe instance that my app spawns? If there was, then I
could seek out and kill this particular process...but I don't want to
kill just any old AcroRd32.exe process, because the user may have
another PDF file open and not want that one closed yet!

Any pointers would be greatly appreciated.

Matt
 
C

Crouchie1998

Use ReleaseComObject like you do with MS Word. That will remove it from the
process list

-----------------------------------------------------

P.S. Spoof your e-mail or you will get tons of SPAM

Example:

(e-mail address removed)
 
Y

YYZ

I looked into that, but I can't get it to work -- I get an error that
the object is of the wrong type. I don't know what other object I
should use...the object that I've dropped on my form I've named
pdfViewer, and it is of type AxAcroPDFLib.AcroPDF. Here is the code
I'm using:

iIndex =
System.Runtime.InteropServices.Marshal.ReleaseComObject(pdfViewer)
Do Until iIndex = 0
iIndex =
System.Runtime.InteropServices.Marshal.ReleaseComObject(pdfViewer)
Loop

On the very first line it blows up.

Is there anywhere special I'm supposed to put this? What object should
I pass to this method?

Matt
 
C

CMM

I believe that AcroRd32.exe closes itself after a while (might depend on the
version).
It basically stays in memory to serve a Web Browser or other app that may
want to load additional PDF's.... like a caching mechanism because it takes
so long to load in the first place. Come back 10 or 15 minutes later and see
if it's still around in memory. I doubt it will be... on my system it goes
away after five minutes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top