Export (0) Print
Expand All
Expand Minimize

GetWindowModuleFileName function

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

Syntax


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

Parameters

hwnd [in]

Type: HWND

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

lpszFileName [out]

Type: LPTSTR

The path and file name.

cchFileNameMax [in]

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]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

GetWindowModuleFileNameW (Unicode) and GetWindowModuleFileNameA (ANSI)

See also

Windows Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft