HANDLE h = HeapCreate(HEAP_GENERATE_EXCEPTIONS, 1024, 4096);
int* test = (int*)HeapAlloc(h, HEAP_GENERATE_EXCEPTIONS, sizeof(int));
__try {
HeapFree(h, 0, ((char*)test));
HeapFree(h, 0, ((char*)test));
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
cout << "i want to get here";
}
new / delete can print message, why HeapAlloc is not? (+ how to handle HeapAlloc double free error?)
Structured Exception Handling doesn't work in this case.
Minimal example using a Vectored exception handler:
Additional information