Jason Viers
2007-07-20 15:35:49 UTC
Is there any built-in way to turn WinHttp error codes into strings?
Most Win32 code uses FormatMessage[1], but it appears that it doesn't
know about winhttp codes, and some of the codes
(WINHTTP_CALLBACK_STATUS_FLAG_*) collide with existing error codes.
I know I can manually embed my own switch/case for them, but that's
rather ugly. Is there a more elegant way to do it?
Thanks
Jason
[1] http://msdn2.microsoft.com/en-us/library/ms679351.aspx
Most Win32 code uses FormatMessage[1], but it appears that it doesn't
know about winhttp codes, and some of the codes
(WINHTTP_CALLBACK_STATUS_FLAG_*) collide with existing error codes.
I know I can manually embed my own switch/case for them, but that's
rather ugly. Is there a more elegant way to do it?
Thanks
Jason
[1] http://msdn2.microsoft.com/en-us/library/ms679351.aspx