Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shellexecute() return on error
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01671906
Message ID:
01672014
Views:
70
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform