Re: How come this is different?
Michael C <[email protected]> Tue, 13 Dec 2016 12:49:32 -0800
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CANyKM1iFOB_rOs5sLkcd3Zor+cLjgZssUH7XfOd-jMa3mjEhxw@mail.gmail.com> |
--===============8020717629127613785== Content-Type: multipart/alternative; boundary=94eb2c05be947ad8e80543905bb2 --94eb2c05be947ad8e80543905bb2 Content-Type: text/plain; charset=UTF-8 in this case, what do i put down for lpAddress? thx On Tue, Dec 13, 2016 at 12:46 PM, eryk sun <[email protected]> wrote: > On Tue, Dec 13, 2016 at 8:06 PM, Michael C > <[email protected]> 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. > --94eb2c05be947ad8e80543905bb2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">in this case, what do i put down for lpAddress?<div><br></= div><div>thx</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_= quote">On Tue, Dec 13, 2016 at 12:46 PM, eryk sun <span dir=3D"ltr"><<a = href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g= t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0= .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On Tue,= Dec 13, 2016 at 8:06 PM, Michael C<br> <<a href=3D"mailto:[email protected]">mysecretrobotfactory@= gmail.<wbr>com</a>> wrote:<br> > I am trying to sort of whether or not my basic memory information para= meter<br> > has received the proper values for each of the attritubes, so far, thi= s is<br> > my print out of them, and I don't know if they are right. please t= ake a<br> > look:<br> <br> </span>=C2=A0[snip]<br> <span class=3D""><br> > kernel32.VirtualQueryEx(<wbr>handle, None, ctypes.byref(mbi),<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ctypes.sizeof(mbi))<br> ><br> > print(mbi.BaseAddress)<br> > print(mbi.AllocationBase)<br> > print(mbi.AllocationProtect)<br> > print(mbi.RegionSize)<br> > print(mbi.State)<br> > print(mbi.Protect)<br> > print(mbi.Type)<br> ><br> > ------- print out------<br> ><br> > None<br> > None<br> > 0<br> > 2228224<br> > 65536<br> > 1<br> > 0<br> <br> </span>You passed NULL (0) for lpAddress. In this case the region BaseAddre= ss<br> is 0, and the RegionSize is a bit more than 2 MB. The region State is<br> 0x10000 (MEM_FREE), so the fields AllocationBase, AllocationProtect,<br> Protect, and Type are undefined. Windows defaults to leaving this<br> region unallocated, which helps to ensure bad pointers (e.g. a NULL<br> pointer) raise an access violation.<br> </blockquote></div><br></div> --94eb2c05be947ad8e80543905bb2-- --===============8020717629127613785== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot --===============8020717629127613785== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ctypes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ctypes-users --===============8020717629127613785==--