Re: Is this a valid memory address?
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Mon, 25 Feb 2008 19:30:31 -0500
Daniel Kaplan <NoSPam@xxxxxxxxxx> wrote:
So in my Hook I am coming up with a lot of USER defined messages:
i.e. WM_USER+1 00000000 03276801
Now granted, lParam could be garbage, it could be the sum of stuff,
or it "could be a pointer to some memory".
What I'd like to do is memcpy it's contents, if it is.
Even if it is a pointer (which you have no way of knowing), you don't
know the size of the buffer it's pointing to, anyway.
Why do you want to memcpy its contents?
Is there a way to tell that that spot is a valid pointer
Well, there's IsBadReadPtr. But of course a random garbage value may
just accidentally be a valid address.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: Is this a valid memory address?
- From: Daniel Kaplan
- Re: Is this a valid memory address?
- References:
- Is this a valid memory address?
- From: Daniel Kaplan
- Is this a valid memory address?
- Prev by Date: Is this a valid memory address?
- Next by Date: Re: malloc() size limit
- Previous by thread: Is this a valid memory address?
- Next by thread: Re: Is this a valid memory address?
- Index(es):
Relevant Pages
|