PsApiGetModuleBaseName Method
Retrieves the base name of the specified module.
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("PsApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static uint GetModuleBaseName(
IntPtr hProcess,
[OptionalAttribute] IntPtr hModule,
StringBuilder baseName,
uint size
)
<DllImportAttribute("PsApi.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetModuleBaseName (
hProcess As IntPtr,
<OptionalAttribute> hModule As IntPtr,
baseName As StringBuilder,
size As UInteger
) As UInteger
Dim hProcess As IntPtr
Dim hModule As IntPtr
Dim baseName As StringBuilder
Dim size As UInteger
Dim returnValue As UInteger
returnValue = PsApi.GetModuleBaseName(hProcess,
hModule, baseName, size)
public:
[DllImportAttribute(L"PsApi.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned int GetModuleBaseName(
IntPtr hProcess,
[OptionalAttribute] IntPtr hModule,
StringBuilder^ baseName,
unsigned int size
)
[<DllImportAttribute("PsApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetModuleBaseName :
hProcess : IntPtr *
[<OptionalAttribute>] hModule : IntPtr *
baseName : StringBuilder *
size : uint32 -> uint32
No code example is currently available or this language may not be supported.
- hProcess IntPtr
-
A handle to the process.
The handle must have the QueryInformation
or QueryLimitedInformation access right.
- hModule IntPtr (Optional)
-
A handle to the module.
If this parameter is Zero, this function returns the name of the file used to create the calling process.
- baseName StringBuilder
-
A pointer to the buffer that receives the base name of the module.
If the base name is longer than maximum number of characters specified by the
size parameter, the base name is truncated.
- size UInt32
-
The size of the baseName buffer, in characters.
UInt32
If the function succeeds, the return value specifies the length of the string copied to the buffer, in characters.
If the function fails, the return value is zero