Decode HResult = -2147467259

前端 未结 4 1668
無奈伤痛
無奈伤痛 2020-12-23 14:07

Can someone help me decode this HResult? What does it mean? I know the negative stands for a failure. How about the rest of the 10 bits?

I referenced MSDN HResult a

4条回答
  •  感动是毒
    2020-12-23 14:55

    Another way to do it is as follows. An HRESULT should contain a System Error Code in its first 32 bits. Using an AND operation will retrieve the error code from the HRESULT:

    int result = (-2147467259 & 0xFFFF)
    

    result is 16389, which is not a part of the System Error Codes list, and as a result, is unspecified.

提交回复
热议问题