Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Findexecutable returns 31, okay or bad news?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00252413
Message ID:
00252452
Views:
9
>31 should mean that there's no application associated with the file. If the buffer that's being passed to the function isn't re-initialized, you could be seeing the results from the previous call to the function.
>
>Care to post a sample of what's going on Bruce?

Sure, George:
declare long FindExecutable in "shell32.dll" ;
string cFile, string cDirectory, string @cResult

cBuffer = space(255)
nRetVal = FindExecutable("important.xls",'\\SMDSRV3\Sampling\Application\Executable' , @cBuffer)
if nRetVal < 32
  messageBox("You don't have Excel installed, sorry.",64)
  return
endif
It runs okay somethimes, but not others. When I changed 32 to 31, it always seems to run fine. However, I have not tested it on a machine without Excel, and I'm concerned that may cause a problem.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform