Skip to content

Files

Latest commit

 

History

History
60 lines (41 loc) · 1.44 KB

FindExecutable.md

File metadata and controls

60 lines (41 loc) · 1.44 KB

Home

Function name : FindExecutable

Group: Shell Functions - Library: shell32


Retrieves the name of and handle to the executable (.exe) file associated with the specified file name.


Code examples:

Accessing the list of Windows Recent Documents
How to find the application associated with a file name
How to make application automatically close all documents it opened

Declaration:

HINSTANCE FindExecutable(
    LPCTSTR lpFile,
    LPCTSTR lpDirectory,
    LPTSTR lpResult
);
  

FoxPro declaration:

DECLARE INTEGER FindExecutable IN shell32;
	STRING lpFile,;
	STRING lpDirectory,;
	STRING @lpResult  

Parameters:

lpFile Address of a null-terminated string specifying a file name. This should be a document.

lpDirectory Address of a null-terminated string specifying the default directory.

lpResult Address of a buffer to receive the file name when the function returns.


Return value:

Returns a value greater than 32 if successful, or a value less than or equal to 32 otherwise.


Comments:

See also: ShellExecute, AssocQueryString.