PdbLib/PdbServer/PdbPaeser/Extensions.cs
2025-06-05 10:51:52 +08:00

21 lines
454 B
C#

using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
namespace Zodiacon.DebugHelp
{
// Token: 0x02000004 RID: 4
internal static class Extensions
{
// Token: 0x06000003 RID: 3 RVA: 0x00002058 File Offset: 0x00000258
public static bool ThrowIfWin32Failed(this bool ok, int error = 0)
{
if (!ok)
{
throw new Win32Exception((error != 0) ? error : Marshal.GetLastWin32Error());
}
return true;
}
}
}