Beispiel #1
0
 internal static void GetIconInfo(IntPtr handle, out ICONINFO iconInfo)
 {
     if (!NativeMethods.GetIconInfo(handle, out iconInfo))
     {
         throw new ArgumentException(Res.User32InvalidHandle, nameof(handle), new Win32Exception());
     }
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 internal static extern bool GetIconInfo(IntPtr hIcon, out ICONINFO piconinfo);
Beispiel #4
0
 internal static extern IntPtr CreateIconIndirect([In] ref ICONINFO piconinfo);