Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shellexecute() return on error
Message
De
16/11/2019 11:54:31
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01671906
Message ID:
01671908
Vues:
71
>Hi,
>
>Is it correct that Shellexecute(), when fails, returns the value less than 32?

Yes, you can check it at https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea and http://www.oehive.org/node/528

>I have the following code and want to be sure it is correct.
>
>
>lnResult =Shellexecute(0, tcCommand, tcFileName, tcParameter,tcDirectory,tnShowCommand)
>
>IF lnResult < 32
>	DO CASE
>	CASE lnResult=2
>		cErrorMessage = "Invalid association or URL."
>	CASE lnResult=31
>		cErrorMessage = "No association."
>	CASE lnResult=29
>		cErrorMessage = "Can't start application."
>	CASE lnResult=30
>		cErrorMessage = "Application already open."
>	OTHERWISE
>		cErrorMessage = "No error information"
>	ENDCASE
>ENDIF	
>
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform