In C#, how do I get the descriptive text for an HRESULT?

11 · Raymond Chen · Aug. 26, 2021, 2:22 p.m.
Suppose your C# code manages to find in its hands a COM HRESULT value. How do you convert that to a descriptive string? One idea is to p/invoke to the Format­Message function, but that’s awfully cumbersome. Maybe we can live off the land. The post In C#, how do I get the descriptive text for an HRESULT? appeared first on The Old New Thing....