I am well aware of the ugliness of this question, I'd still like to know if it's possible:
When a program tries to read/write to an invalid pointer (NULL, unallocated block, etc') windows crashes the application with an access violation exception.
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?