PsApiGetMappedFileName Method
Checks whether the specified address is within a memory-mapped file in the address space of the specified process.
If so, the function returns the name of the memory-mapped file.
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 GetMappedFileName(
IntPtr hProcess,
IntPtr address,
StringBuilder filename,
uint size
)
<DllImportAttribute("PsApi.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetMappedFileName (
hProcess As IntPtr,
address As IntPtr,
filename As StringBuilder,
size As UInteger
) As UInteger
Dim hProcess As IntPtr
Dim address As IntPtr
Dim filename As StringBuilder
Dim size As UInteger
Dim returnValue As UInteger
returnValue = PsApi.GetMappedFileName(hProcess,
address, filename, size)
public:
[DllImportAttribute(L"PsApi.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned int GetMappedFileName(
IntPtr hProcess,
IntPtr address,
StringBuilder^ filename,
unsigned int size
)
[<DllImportAttribute("PsApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetMappedFileName :
hProcess : IntPtr *
address : IntPtr *
filename : 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
and VirtualMemoryRead access right.
- address IntPtr
-
The address to be verified.
- filename StringBuilder
-
A pointer to the buffer that receives the name of the memory-mapped file to which the address specified by lpv belongs.
- size UInt32
-
The size of the filename 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