<PackageReference Include="System.Drawing.Common" Version="10.0.0-rc.1.25451.107" />

LRESULT

using System; using System.CodeDom.Compiler; using System.Diagnostics; using System.Runtime.CompilerServices; using Windows.Win32.Graphics.Gdi; using Windows.Win32.UI.WindowsAndMessaging; namespace Windows.Win32.Foundation { [DebuggerDisplay("{Value}")] [GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")] internal readonly struct LRESULT : IEquatable<LRESULT> { internal readonly IntPtr Value; public unsafe ushort HIWORD => (ushort)((long)(IntPtr)(void*)((ulong)(long)Value >> 16) & 65535); public short SIGNEDHIWORD => (short)HIWORD; public ushort LOWORD => (ushort)((long)Value & 65535); public short SIGNEDLOWORD => (short)LOWORD; public static explicit operator int(LRESULT value) { return (int)(long)value.Value; } public static explicit operator uint(LRESULT value) { return (uint)(long)value.Value; } public unsafe static explicit operator UIntPtr(LRESULT value) { return (UIntPtr)(void*)(long)value.Value; } public static explicit operator char(LRESULT value) { return (char)(long)value.Value; } public static explicit operator HWND(LRESULT value) { return (HWND)value.Value; } public static explicit operator HFONT(LRESULT value) { return (HFONT)value.Value; } public static explicit operator HICON(LRESULT value) { return (HICON)value.Value; } public static explicit operator BOOL(LRESULT value) { return (BOOL)(int)(long)value.Value; } public static explicit operator LRESULT(BOOL value) { return new LRESULT((IntPtr)(int)value); } public static LRESULT MAKELONG(int low, int high) { return (LRESULT)(IntPtr)((ushort)((long)low & 65535) | ((ushort)((long)high & 65535) << 16)); } internal LRESULT(IntPtr value) { Value = value; } public static implicit operator IntPtr(LRESULT value) { return value.Value; } public static explicit operator LRESULT(IntPtr value) { return new LRESULT(value); } public static bool operator ==(LRESULT left, LRESULT right) { return left.Value == right.Value; } public static bool operator !=(LRESULT left, LRESULT right) { return !(left == right); } public bool Equals(LRESULT other) { return Value == other.Value; } public override bool Equals(object obj) { if (obj is LRESULT) { LRESULT other = (LRESULT)obj; return Equals(other); } return false; } public override int GetHashCode() { return Value.GetHashCode(); } public override string ToString() { DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(2, 1); defaultInterpolatedStringHandler.AppendLiteral("0x"); defaultInterpolatedStringHandler.AppendFormatted(Value, "x"); return defaultInterpolatedStringHandler.ToStringAndClear(); } } }