tstNtQueryStuff.cpp revision 739d6ae13d627830974df4bfba63c1d5fab987b7
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * SUP Testcase - Exploring some NT Query APIs.
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2006-2012 Oracle Corporation
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * available from http://www.virtualbox.org. This file is free software;
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * you can redistribute it and/or modify it under the terms of the GNU
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * General Public License (GPL) as published by the Free Software
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
fcae7923a3c756b333f1e33eba002edf4448fb54vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * The contents of this file may alternatively be used under the terms
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * of the Common Development and Distribution License Version 1.0
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * VirtualBox OSE distribution, in which case the provisions of the
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * CDDL are applicable instead of those of the GPL.
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * You may elect to license modified versions of this file under the
377d39fe3665e7789e39798b5d444df798ab610cvboxsync * terms and conditions of either the GPL or the CDDL or both.
377d39fe3665e7789e39798b5d444df798ab610cvboxsync/*******************************************************************************
377d39fe3665e7789e39798b5d444df798ab610cvboxsync* Header Files *
377d39fe3665e7789e39798b5d444df798ab610cvboxsync*******************************************************************************/
377d39fe3665e7789e39798b5d444df798ab610cvboxsynctypedef enum
377d39fe3665e7789e39798b5d444df798ab610cvboxsynctypedef struct
377d39fe3665e7789e39798b5d444df798ab610cvboxsyncNTSYSAPI NTSTATUS NTAPI NtQueryVirtualMemory(IN HANDLE hProcess,
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync/*******************************************************************************
377d39fe3665e7789e39798b5d444df798ab610cvboxsync* Structures and Typedefs *
377d39fe3665e7789e39798b5d444df798ab610cvboxsync*******************************************************************************/
377d39fe3665e7789e39798b5d444df798ab610cvboxsynctypedef struct FLAGDESC
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync const char *psz;
if (fWithSpace)
return pszBuf;
static char *stringifyAppendUnknownFlags(uint32_t fFlags, char *pszBuf, size_t *pcbBuf, bool fWithSpace)
fWithSpace = true;
return pszBuf;
static char *stringifyFlags(uint32_t fFlags, char *pszBuf, size_t cbBuf, PCFLAGDESC paFlagDesc, size_t cFlagDesc)
if (fFlags)
if (fFlags)
return pszBufStart;
static void tstQueryVirtualMemory(void)
(void const *)uPtrWhere,
&MemInfo,
sizeof(MemInfo),
&cbActual);
int main()
return rcExit;