Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File 'shellexecute.prg' does not exist
Message
From
03/11/2022 16:58:56
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01685206
Message ID:
01685224
Views:
36
Dimitry

>A follow up question. If I change my code to the one you suggest, are you saying that the call to
>DECLARE INTEGER, inside the FUNCTION ShellExecute() will not produce anything, if it is called the second time? How would I see it in the Debugger?
* we assume no DLL is declared yet
* next line calls the function, the function declares and call the dll
ShellExecute( ....
* next line calls the the dll directly, because dll has precedence over function
ShellExecute( ....

* oops, a fool clear the dlll
clear dlls ShellExecute

* next line calls the function again, since the dll is not longer declared
ShellExecute( ....

*repeat until false

FUNCTION  ShellExecute (tHWND, tlpVerb, tlpFile, tlpParameters, tlpDirectory, tnShowCmd)

 DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
    INTEGER HWND, ;
    STRING lpVerb, ;
    STRING lpFile, ;
    STRING lpParameters, ;
    STRING lpDirectory, ;
    LONG nShowCmd

 RETURN  ShellExecute (tHWND, tlpVerb, tlpFile, tlpParameters, tlpDirectory, tnShowCmd )
Endfunc
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
Next
Reply
Map
View

Click here to load this message in the networking platform