Kernel32QueryFullProcessImageName Method

Retrieves the full name of the executable image for the specified process.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool QueryFullProcessImageName(
	IntPtr hProcess,
	ProcessNameFlags flags,
	StringBuilder lpExeName,
	ref int refSize
)

Parameters

hProcess  IntPtr
A handle to the process.

This handle must be created with the QueryInformation or QueryLimitedInformation access right.

flags  ProcessNameFlags
Specifies the resulting format of the process path.
lpExeName  StringBuilder
The path to the executable image.

If the function succeeds, this string is null-terminated.

refSize  Int32
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

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also