Reputation: 1766
I have an application that opens many windows. Sometimes, I get wglCreateContext() returns 0 and GetLastError() returns 0xc007001f.
It happens on Intel graphic cards only.
Did someone see it? Someone knows what it is?
Upvotes: 0
Views: 658
Reputation: 12927
Also you can use FormatMessage to get string for error description:
DWORD err = GetLastError();
char* msg;
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER, 0, err, 0, (LPCSTR)&msg, 0, 0);
MessageBoxA(0, msg, "Error", 0);
LocalFree(msg);
Upvotes: 0
Reputation: 942518
You can decompose the error code into its parts. 0xC makes it a fatal error, 007 produces facility code 7 which is the winapi. Which makes the last four digits Windows error 31:
//
// MessageId: ERROR_GEN_FAILURE
//
// MessageText:
//
// A device attached to the system is not functioning.
//
#define ERROR_GEN_FAILURE 31L
Which makes it a pretty basic device driver kind of problem, assuming you passed a correct device context handle to wglCreateContext(). The kind that typically requires a video driver update and ensuring that the right kind of OpenGL driver is installed. Nothing you can do to fix of course, this is a problem that the user needs to tackle.
Upvotes: 4
Reputation: 2607
I believe error 0xc007001f is when SetPixelFormat()
fails. Which means, you are trying to use some feature in the pixel format that isn't supported by that card. If I'm not mistaken, Intel graphics cards barely support OpenGL (only [EDIT: 2.1]).
Upvotes: 0