internal static void GetIconInfo(IntPtr handle, out ICONINFO iconInfo) { if (!NativeMethods.GetIconInfo(handle, out iconInfo)) { throw new ArgumentException(Res.User32InvalidHandle, nameof(handle), new Win32Exception()); } }
internal static IntPtr CreateIconIndirect(ref ICONINFO iconinfo) { IntPtr result = NativeMethods.CreateIconIndirect(ref iconinfo); if (result == IntPtr.Zero) { throw new ArgumentException(Res.User32CreateIconIndirectFailed, nameof(iconinfo), new Win32Exception()); } return(result); }
internal static extern bool GetIconInfo(IntPtr hIcon, out ICONINFO piconinfo);
internal static extern IntPtr CreateIconIndirect([In] ref ICONINFO piconinfo);