Hi Dmitry,
>>Do, you clear DLLS before every call?
No- the first time you call ShellExecute() the VFP function is called, which declares the API ShellExecute. After that, including when ShellExecute is called from the VFP function itself, the declared function takes precedence.
If you did CLEAR DLLS then the VFP function will be called again next time.
The technique means ShellExecute doesn't need to be Declared unless/until it is needed, and you shouldn't ever see the "function not found" as long as the VFP function is in a SET PROC or included in your project. The function is also only ever declared once rather than repeatedly as you sometimes see when people want to make sure it is declared, since DECLARE definitely carries a performance hit.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1