Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File 'shellexecute.prg' does not exist
Message
From
04/11/2022 03:15:05
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
04/11/2022 02:37:54
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01685206
Message ID:
01685230
Views:
45
Likes (1)
>>>Hello,
>>>
>>>A couple of times I received email error message pointing to the fact that
>>>'ShellExecute.prg' does not exist.
>>>
>>>In my code I do have calls to execute the ShellExecute (Windows API function) when printing PDF documents.
>>>So, the ShellExecute is outside of what my program created.
>>>
>>>What would cause this error?
>>>
>>>TIA
>>
>>This is the code of how my program executes the ShellExecute. Please let me know if you see anything wrong with my code.
>>
>>ADLLS( aDllList )
>>
>>IF TYPE( "aDllList" ) = "C" AND ASCAN(aDllList,"ShellExecute",-1,-1,1) > 0
>>	lLoadDll = .F.
>>ENDIF
>>
>>IF lLoadDll
>>		
>>	DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>>	    INTEGER hwnd, ;
>>	    STRING lpVerb, ;
>>	    STRING lpFile, ;
>>	    STRING lpParameters, ;
>>	    STRING lpDirectory, ;
>>	    LONG nShowCmd
>>
>>ENDIF 
>>
>>lnResult =Shellexecute(0, tcCommand, tcFileName, tcParameter,tcDirectory,tnShowCommand)
>>
>>
>
>I think most of this code is overkill. No need for checking if the dll is already declared. Just declare it, if it's already declare VFP won't declare it again.

declaring a dll is slow, the trick with the "overloaded" function is cheap and fast, even faster then if.

:)
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform