mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
[PTRun][System] Recycle Bin command: Allow opening RB + Improvements (#23045)
This commit is contained in:
@@ -44,5 +44,15 @@ namespace Wox.Plugin.Common.Win32
|
||||
|
||||
return NativeMethods.CloseHandle(handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description for an HRESULT error code.
|
||||
/// </summary>
|
||||
/// <param name="hr">The HRESULT number</param>
|
||||
/// <returns>A string containing the description.</returns>
|
||||
public static string MessageFromHResult(int hr)
|
||||
{
|
||||
return Marshal.GetExceptionForHR(hr).Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user