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 |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
GetWindowModuleFileNameW (Unicode) and GetWindowModuleFileNameA (ANSI) |
See also