Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shellexecute() return on error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01671906
Message ID:
01672014
Vues:
68
Make sure you understand what 'fails' means in this context.

Failing here means 'fails to launch' or find the executable. It says nothing about the actual execution of the process however as ShellExecute is basically a fire and forget operation that doesn't wait for completion.

+++ Rick ---

>Hi,
>
>Is it correct that Shellexecute(), when fails, returns the value less than 32?
>
>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
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform