I have a problem with an installation on a new client.
We've used a function FOREVER that runs a ShellExec passing as a parm
the name of an FDF (Adobe Format descriptor file) that then opens a PDF.
We've never had problems with it until recently.
On this new install, all 5 machines don't do anything when we ShellExec
passing OPEN (or NULL) and the FDF filename. Shellexec returns code 31,
which means no associated app. However, clicking directly on the FDF
file works fine, opening the associated Adobe Reader.
All 5 machines are XP SP3, but when I loaded SP3 on a test machine here,
it worked fine, so it's not a SP issue.
Interestingly, using the VFP RUN command works, and I can use that as a
last resort if I can't find a better solution (don't like the DOS box)
Anyone heard anything like this? Any suggestions. Shellexec code is
pretty standard, and is pasted below.
----------------------------------------------
* Open the FDF file in Acrobat Reader.
DECLARE LONG ShellExecute IN "shell32.dll" ;
LONG hwnd, STRING lpszOp, ;
STRING lpszFile, STRING lpszParams, ;
STRING lpszDir, LONG nShowCmd
LOCAL lnResult
* lnResult = ShellExecute( 0, "Open", "&cFile.", "", "", 1)
lnResult = ShellExecute( 0, "", cFile, "", "", 1)
IF lnResult <= 32 && ShellExecute returns a value greater
than 32 if
successful
cMsg = "Unable to launch default viewer for file " + cFile+
CHR(13) +
"ShellExec Returned code: " + ALLTRIM(STR(lnResult))
_cliptext = cMsg
MessageBox(cmsg,0+64,"")
ELSE
MessageBox("OK - ShellExec returned code " +
ALLTRIM(STR(lnResult)),0+64,"")
ENDIF
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.