Search code examples
windowswinapiwindows-xperror-reportingwindows-error-reporting

Win32: How to crash?


i'm trying to figure out where Windows Error Reports are saved; i hit Send on some earlier today, but i forgot that i want to "view the details" so i can examine the memory minidumps.

But i cannot find where they are stored (and google doesn't know).

So i want to write a dummy application that will crash, show the WER dialog, let me click "view the details" so i can get to the folder where the dumps are saved.

How can i crash on Windows?

Edit: The reason i ask is because i've tried overflowing the stack, and floating point dividing by zero. Stack Overflow makes the app vanish, but no WER dialog popped up. Floating point division by zero results in +INF, but no exception, and no crash.


Solution

  • Should be a good start:

    int main(int argc, char* argv[])
    {
       char *pointer = NULL;
       printf("crash please %s", *pointer);
       return 0;
    }