title: How to check if a pointer is valid?
body: <p>I am well aware of the ugliness of this question, I'd still like to know if it's possible:</p>
  
  <p>When a program tries to read/write to an invalid pointer (NULL, unallocated block, etc') windows crashes the application with an access violation exception.</p>
  
  <p>The question is, is there a way to check wether this pointer will generate an exception before trying to use it, or else, is there a way to catch this exception?</p>