GetMappedFileName function psapi

Win32Result<int> GetMappedFileName(
  1. HANDLE hProcess,
  2. Pointer<NativeType> lpv,
  3. PWSTR lpFilename,
  4. int nSize,
)

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.

To learn more, see learn.microsoft.com/windows/win32/api/psapi/nf-psapi-getmappedfilenamew.

Implementation

Win32Result<int> GetMappedFileName(
  HANDLE hProcess,
  Pointer lpv,
  PWSTR lpFilename,
  int nSize,
) {
  resolveGetLastError();
  final result_ = _GetMappedFileName(hProcess, lpv, lpFilename, nSize);
  return .new(value: result_, error: GetLastError());
}