Commit 9cd5bc0d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

kernelbase: Add QueryVirtualMemoryInformation().

parent fc5cb9b5
......@@ -1250,7 +1250,7 @@
@ stdcall QueryThreadpoolStackInformation(ptr ptr)
@ stdcall QueryUnbiasedInterruptTime(ptr) ntdll.RtlQueryUnbiasedInterruptTime
# @ stub QueryUnbiasedInterruptTimePrecise
# @ stub QueryVirtualMemoryInformation
@ stdcall QueryVirtualMemoryInformation(long ptr long ptr long ptr)
@ stdcall QueryWorkingSet(long ptr long)
@ stdcall QueryWorkingSetEx(long ptr long)
@ stdcall QueueUserAPC(ptr long long)
......
......@@ -1412,6 +1412,23 @@ LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocExNuma( HANDLE process, void *addr,
/***********************************************************************
* QueryVirtualMemoryInformation (kernelbase.@)
*/
BOOL WINAPI DECLSPEC_HOTPATCH QueryVirtualMemoryInformation( HANDLE process, const void *addr,
WIN32_MEMORY_INFORMATION_CLASS info_class, void *info, SIZE_T size, SIZE_T *ret_size)
{
switch (info_class)
{
case MemoryRegionInfo:
return set_ntstatus( NtQueryVirtualMemory( process, addr, MemoryRegionInformation, info, size, ret_size ));
default:
FIXME("Unsupported info class %u.\n", info_class);
return FALSE;
}
}
/***********************************************************************
* CPU functions
***********************************************************************/
......
......@@ -416,6 +416,7 @@ SOURCES = \
mediaerr.h \
mediaobj.idl \
medparam.idl \
memoryapi.h \
metahost.idl \
mfapi.h \
mfd3d12.idl \
......
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
typedef enum WIN32_MEMORY_INFORMATION_CLASS
{
MemoryRegionInfo
} WIN32_MEMORY_INFORMATION_CLASS;
typedef struct WIN32_MEMORY_REGION_INFORMATION
{
PVOID AllocationBase;
ULONG AllocationProtect;
union
{
ULONG Flags;
struct
{
ULONG Private : 1;
ULONG MappedDataFile : 1;
ULONG MappedImage : 1;
ULONG MappedPageFile : 1;
ULONG MappedPhysical : 1;
ULONG DirectMapped : 1;
ULONG Reserved : 26;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
SIZE_T RegionSize;
SIZE_T CommitSize;
} WIN32_MEMORY_REGION_INFORMATION;
BOOL WINAPI QueryVirtualMemoryInformation(HANDLE process,const void *addr,
WIN32_MEMORY_INFORMATION_CLASS info_class, void *info, SIZE_T size, SIZE_T *ret_size);
......@@ -43,6 +43,7 @@ extern "C" {
#include <processthreadsapi.h>
#include <synchapi.h>
#include <threadpoolapiset.h>
#include <memoryapi.h>
/* Windows Exit Procedure flag values */
#define WEP_FREE_DLL 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment