Is there a way to get the string representation of HRESULT value using win API?

后端 未结 4 1843
陌清茗
陌清茗 2020-12-01 02:55

Is there a function in win API which can be used to extract the string representation of HRESULT value?

The problem is that not all return values are documented in M

4条回答
  •  鱼传尺愫
    2020-12-01 03:16

    Since c++11, this functionality is built into the standard library:

    #include 
    
    std::string message = std::system_category().message(hr)
    

提交回复
热议问题