Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute Failing
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
ShellExecute Failing
Miscellaneous
Thread ID:
01025967
Message ID:
01025967
Views:
64
I have the following code. It had worked forever with no problems.
Today I failed. The ShellExecute function is now returning 2.

How do I find out what this '2' represents?
LPARAMETERS cApplication, cStartFolder, cParamString

	LOCAL iRetVal

	IF EMPTY(cParamString)
		cParamString = ""
	ELSE
		cParamString = '"' + cParamString + '"'
	ENDIF

	IF EMPTY(cStartFolder)
		cStartFolder = ""
	ENDIF

	DECLARE INTEGER GetDesktopWindow IN WIN32API
	
	DECLARE INTEGER ShellExecute IN shell32; 
	    INTEGER hwnd,; 
	    STRING  lpOperation,; 
	    STRING  lpFile,; 
	    STRING  lpParameters,;   
	    STRING  lpDirectory,; 
	    INTEGER nShowCmd 

	hWnd = GetDesktopWindow()

	iRetVal = ShellExecute(hWnd, "open", cApplication, cParamString , cStartFolder, 5)

RETURN
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform