Way to figure out if a target memory is good to read/write?

Hmmm… IsBad*Ptr() functions are deprecated in Win32 API! Ok.. but what if you need it? Actually there is no reliable way to figure out if a pointer is valid or not. If you suffer such problem, it should be fixed at the caller side or the side where it prepared the pointer.

But.. what if you really need it even though you sufficiently considered that?
What if some external code gives you a bad pointer?

Here is a good blog post, “There is no point improving the implementation of a bad idea.”

There is a simple drop-in replacement and it’s.. reasonable.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: