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">&lt;<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>
&lt;<a href=3D"mailto:[email protected]">mysecretrobotfactory@=
gmail.<wbr>com</a>&gt; wrote:<br>
&gt; I am trying to sort of whether or not my basic memory information para=
meter<br>
&gt; has received the proper values for each of the attritubes, so far, thi=
s is<br>
&gt; my print out of them, and I don&#39;t know if they are right. please t=
ake a<br>
&gt; look:<br>
<br>
</span>=C2=A0[snip]<br>
<span class=3D""><br>
&gt; kernel32.VirtualQueryEx(<wbr>handle, None, ctypes.byref(mbi),<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ctypes.sizeof(mbi))<br>
&gt;<br>
&gt; print(mbi.BaseAddress)<br>
&gt; print(mbi.AllocationBase)<br>
&gt; print(mbi.AllocationProtect)<br>
&gt; print(mbi.RegionSize)<br>
&gt; print(mbi.State)<br>
&gt; print(mbi.Protect)<br>
&gt; print(mbi.Type)<br>
&gt;<br>
&gt; ------- print out------<br>
&gt;<br>
&gt; None<br>
&gt; None<br>
&gt; 0<br>
&gt; 2228224<br>
&gt; 65536<br>
&gt; 1<br>
&gt; 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==--