Re: [ctypes-users] How come this is different?
Brought to you by:
theller
From: Michael C <mys...@gm...> - 2016-12-13 20:49:38
|
in this case, what do i put down for lpAddress? thx On Tue, Dec 13, 2016 at 12:46 PM, eryk sun <er...@gm...> wrote: > On Tue, Dec 13, 2016 at 8:06 PM, Michael C > <mys...@gm...> wrote: > > I am trying to sort of whether or not my basic memory information > parameter > > has received the proper values for each of the attritubes, so far, this > is > > my print out of them, and I don't know if they are right. please take a > > look: > > [snip] > > > kernel32.VirtualQueryEx(handle, None, ctypes.byref(mbi), > > ctypes.sizeof(mbi)) > > > > print(mbi.BaseAddress) > > print(mbi.AllocationBase) > > print(mbi.AllocationProtect) > > print(mbi.RegionSize) > > print(mbi.State) > > print(mbi.Protect) > > print(mbi.Type) > > > > ------- print out------ > > > > None > > None > > 0 > > 2228224 > > 65536 > > 1 > > 0 > > You passed NULL (0) for lpAddress. In this case the region BaseAddress > is 0, and the RegionSize is a bit more than 2 MB. The region State is > 0x10000 (MEM_FREE), so the fields AllocationBase, AllocationProtect, > Protect, and Type are undefined. Windows defaults to leaving this > region unallocated, which helps to ensure bad pointers (e.g. a NULL > pointer) raise an access violation. > |