tags:

views:

244

answers:

2

Is there any simple Win32 API to check whether a pointer points to a valid memory location before using it for write operation?

+6  A: 

This looks like a duplicate of:

Testing pointers for validity (C/C++)

Jim H.
+10  A: 

There is a whole series of IsBadXXXPtr() functions, but you should never, ever use them.

jeffamaphone
+1 for everything that refers to Raymond Chen.
Johann Gerell