I'm not sure what your intent here is, but those flags don't seem right. You need these flags:
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
WGL_CONTEXT_MINOR_VERSION_ARB, 1,
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
0
Don't forget the terminating zero.
If context creation fails, all bets are off. The driver may be crashing because you don't have a valid context.
Graham