I'm compiling using VisualStudio 2012 for x64.
It compiled OK for the most part except for:
1>ClCompile:
1> crash_generation_app.cc
1>crash_generation_app.cc(365): error C2065: 'GWL_HINSTANCE' : undeclared identifier
HINSTANCE instance = (HINSTANCE)GetWindowLong(wnd, GWL_HINSTANCE);
According to the
docs GetWindowLong has been superseded by GetWindowLongPtr (for support on 64bit systems). I haven't delved into the implications, but just changing that one line to:
HINSTANCE instance = (HINSTANCE)GetWindowLongPtr(wnd, GWLP_HINSTANCE);
At least allows it to compile. The
GetWindowLongPtr doco says "When compiling for 32-bit Windows, GetWindowLongPtr is defined as a call to the GetWindowLong function." So it should be safe for 32bit compilations.