Retrieves the full name of the executable image for the specified process.
Syntax
BOOL WINAPI QueryFullProcessImageName(
__in HANDLE hProcess,
__in DWORD dwFlags,
__out LPTSTR lpExeName,
__inout PDWORD lpdwSize
);
Parameters
- hProcess [in]
-
A handle to the process. This handle must be created with the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see
Process Security and Access Rights.
- dwFlags [in]
-
This parameter can be one of the following values.
| Value | Meaning |
- 0
| The name should use the Win32 path format.
|
- PROCESS_NAME_NATIVE
- 0x00000001
| The name should use the native system path format.
|
- lpExeName [out]
-
The path to the executable image. If the function succeeds, this string is null-terminated.
- lpdwSize [in, out]
-
On input, specifies the size of the lpExeName buffer, in characters. On success, receives the number of characters written to the buffer, not including the null-terminating character.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
Remarks
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later.
Requirements
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Header | Winbase.h (include Windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
| Unicode and ANSI names | QueryFullProcessImageNameW (Unicode) and QueryFullProcessImageNameA (ANSI) |
See Also
- GetModuleFileNameEx
- GetProcessImageFileName
- Process and Thread Functions
Send comments about this topic to Microsoft
Build date: 11/19/2009