Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 11 JAN 1999 09:24:01AM Hank Huizinga wrote:

To view documents, we are using the command ShellExecute(hwnd,"OPEN",Name:\00\,0,drive():\00\,1). This works great in Windows 95/98 for viewing Word 97 and Excel 97 files.

However, in NT it does not work. If Word or Excel is already running, the document is displayed (ie. it work properly). If Word or Excel is not running, nothing happens. Any reason why this would be?

Note: for viewing text files it NT, it works fine with notepad. For viewing URL pages, it works in NT.

Help appreciated,

Hank


At 15 JAN 1999 02:25PM Hank Huizinga wrote:

This is a bug in windows NT 4.0 that is fixed in the latest Service Pack.

The following is taken from Article ID: Q172982 posted on www.microsoft.com

SYMPTOMS

You may get a get an error code 2 (ERROR_FILE_NOT_FOUND) from ShellExecute if the associated executable file exists in a directory path containing a long file name.

CAUSE

The 16-bit WinExec is unable to handle unquoted long file names properly. It will incorrectly detect spaces as argument separators. For example, if you run ShellExecute on readme.txt, from 16-bit Visual Basic, it will try to locate the associated notepad.exe. If it exists in a directory with spaces or the file with which you run ShellExecute has spaces, ShellExecute will fail with the Error 2.

RESOLUTION

To resolve this problem, obtain the latest service pack for Windows NT version 4.0. For more information, please see the following article in the Microsoft Knowledge Base.

 ARTICLE-ID: Q152734
 TITLE     : How to Obtain the Latest Windows NT 4.0 Service Pack

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/a1194956582bf175852566f6004f1a88.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1