Kernel32QueryFullProcessImageName Method
Retrieves the full name of the executable image for the specified process.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function QueryFullProcessImageName (
hProcess As IntPtr,
flags As ProcessNameFlags,
<OutAttribute> lpExeName As StringBuilder,
ByRef refSize As Integer
) As Boolean
Dim hProcess As IntPtr
Dim flags As ProcessNameFlags
Dim lpExeName As StringBuilder
Dim refSize As Integer
Dim returnValue As Boolean
returnValue = Kernel32.QueryFullProcessImageName(hProcess,
flags, lpExeName, refSize)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool QueryFullProcessImageName(
[InAttribute] IntPtr hProcess,
[InAttribute] ProcessNameFlags flags,
[OutAttribute] StringBuilder^ lpExeName,
int% refSize
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member QueryFullProcessImageName :
hProcess : IntPtr *
flags : ProcessNameFlags *
lpExeName : StringBuilder byref *
refSize : int byref -> bool
No code example is currently available or this language may not be supported.
- 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.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.