FindExecutableImage

The FindExecutableImage function locates an executable image file.

HANDLE FindExecutableImage(
  IN LPSTR FileName,    
  IN LPSTR SymbolPath,  
  OUT LPSTR ImageFilePath  
);
 

Parameters

FileName
Pointer to a null-terminated string that specifies the name of the executable image file. You can use a partial path.
SymbolPath
Pointer to a null-terminated string that specifies the path where symbol files are located. This can be multiple paths, with each separated by a semicolon (;).
ImageFilePath
Pointer to a null-terminated string that receives the full path of the executable image file that is located.

Return Values

If the function succeeds, the return value is an open handle to the executable image file.

If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.

Remarks

The FindExecutableImage function is used to locate an executable image file. This function is provided so executable image files can be located in several different directories through a single function call. The SymbolPath parameter can contain multiple paths, with each separated by a semicolon (;). When multiple paths are specified, each directory tree is searched for the executable image file. When the file is located, the search stops. Thus, be sure to specify SymbolPath with the paths in the correct order.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in imagehlp.h.
  Import Library: Use imagehlp.lib.

See Also

PE Image Helper (ImageHlp) Overview, ImageHlp Debugger Functions