We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13965e2 commit cc78d53Copy full SHA for cc78d53
src/Microsoft.Windows.CsWin32/templates/HRESULT.cs
@@ -61,7 +61,9 @@ internal HRESULT ThrowOnFailure(IntPtr errorInfo = default)
61
return this;
62
}
63
64
- public override string ToString() => this.Value.ToString();
+ internal static HRESULT HRESULT_FROM_WIN32(WIN32_ERROR error) => new(((int)error & 0x0000FFFF) | unchecked((int)0x80070000));
65
66
- internal string ToString(string format, IFormatProvider formatProvider) => ((uint)this.Value).ToString(format, formatProvider);
+ public override string ToString() => $"0x{this.Value:X8}";
67
+
68
+ internal string ToString(string format, IFormatProvider formatProvider) => ((uint)this.Value).ToString(format, formatProvider);
69
0 commit comments