Greetings,

Running Vista and VB6:

I'm using shellexecute to launch files with their associated application. This works for all files except PDF files. With PDF files, I can launch a given file one time successfully, then any subsequent attempts to launch that same file results in the following:

* Adobe Reader opens
* Adobe Reader reports the following error:
"There was an error opening this document. This file is already open or in use by another application."

I can open the file by double-clicking on it from Windows Explorer.

After some time passes, I may or may not be able to successfully launch this same PDF file from my app. Restarting my app has no effect on this behavior.

Here is the code I'm using:

Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Const SW_SHOWNORMAL as Long = 1

sAddr = sAddr & vbNullChar
lHndl = ShellExecute(mf.hwnd, "open", sAddr, "", "", SW_SHOWNORMAL)
Any clues would be much appreciated.