File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -128,20 +128,8 @@ static std::string build_callback_error_msg(_In_ WINHTTP_ASYNC_RESULT *error_res
128
128
error_msg << " Unknown WinHTTP Function" ;
129
129
break ;
130
130
}
131
- error_msg << " : " << error_result->dwError << " : " ;
132
- std::array<char , 256 > buf = { 0 };
133
-
134
- auto hr = ::FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
135
- NULL ,
136
- error_result->dwError ,
137
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
138
- buf.data (),
139
- buf.size () - 1 ,
140
- NULL );
141
- if (hr == 0 )
142
- error_msg << buf.data ();
143
- else
144
- error_msg << " ?" ;
131
+ error_msg << " : " << error_result->dwError << " : "
132
+ << utility::details::windows_category ().message (error_result->dwError );
145
133
return error_msg.str ();
146
134
}
147
135
You can’t perform that action at this time.
0 commit comments