GetWindowModuleFileName

[This is preliminary documentation and subject to change.]

Retrieves the full path and file name of the module associated with the given window handle.

UINT WINAPI GetWindowModuleFileName(
  HWND hwnd,
  LPTSTR lpszFileName,
  UINT cchFileNameMax
);
 

Parameters

hwnd
Handle to the window whose module file name will be retrieved.
lpszFileName
Address of a string variable that will contain the executable file's path and file name.
cchFileNameMax
Value specifying the maximum number of characters to copy into the buffer at lpszFileName.

Return Values

Returns a value representing the total number of characters copied into the buffer.