See the attached gobal function IsDynamic(void* pPointer), which returns true if the pPointer was created on the heap. The idea is to get a pointer to the heap start and compare it to pPointer. In...