From: test on


"mr.sir bossman" wrote:

> > >I am new to using VirtualAlloc and was wondering if someone could tell
> > >me
> > > what I am doing wrong.
> > >
> > > I get a "First-chance exception in XXXX.exe: 0xC0000005: Access
> > > Violation."
> > >
> > > struct _WndProcThunk
> > > {
> > > DWORD m_mov; //32bits
> > > DWORD m_this; //32bits
> > > BYTE m_jmp; //8 bits
> > > DWORD m_relproc; //32bits 13 bytes?
> > > };
> >
> > No, you haven't considered alignment, this is more probably 16 bytes, as
> > there will likely be 3 unused bytes between m_jmp and m_relproc.
> >
> > Check what sizeof(_WndProcThunk) really returns!
> I did a trace and sizeof(_WndProcThunk) = 13 bytes
> >
> > And, what are you trying to hack in the first place? :-)
> Toying around trying to fix ATL for AMD.