The following EndDraw() function returns an HRESULT error code:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371924%28v=vs.85%29.aspx
The documentation specifies:
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code and sets tag1 and tag2 to the tags that were active when the error occurred.
…and then returns an HRESULT indicating the success of the operations…
I am getting a return value of -2003238911 (0x88990001) which doesn’t appear on Microsoft’s "Common HRESULT values" page:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa378137%28v=vs.85%29.aspx
I have also searched for the error code in WinError.h but can’t find it there either. If it returns this code, there must be a way to find out what it means.
How do I interpret this error code to find out what went wrong?
You use the Google, on which the top result for that hex code has this:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370979(v=vs.85).aspx
I don’t know the first thing about graphics programming or Windows programming, but I think this answers your question, combined with the docs stating that the tag values will be given back to you referring to the point where the error occurred.