Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Findexecutable returns 31, okay or bad news?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00252413
Message ID:
00252452
Vues:
8
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform