GetWindowModuleFileNameA function

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

Syntax

UINT GetWindowModuleFileNameA(
  HWND  hwnd,
  LPSTR pszFileName,
  UINT  cchFileNameMax
);

Parameters

hwnd

Type: HWND

A handle to the window whose module file name is to be retrieved.

pszFileName

Type: LPTSTR

The path and file name.

cchFileNameMax

Type: UINT

The maximum number of characters that can be copied into the lpszFileName buffer.

Return Value

Type: Type: UINT

The return value is the total number of characters copied into the buffer.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See Also

Windows Overview