From c4d83136caeb9ebb2ff4105403c992cf88a2274c Mon Sep 17 00:00:00 2001 From: David Hall Date: Sat, 21 Jan 2023 15:15:08 -0700 Subject: [PATCH] Added parameter attributes --- PInvoke/User32/WinUser.Icon.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PInvoke/User32/WinUser.Icon.cs b/PInvoke/User32/WinUser.Icon.cs index 0ede2a8a..3ef54c5c 100644 --- a/PInvoke/User32/WinUser.Icon.cs +++ b/PInvoke/User32/WinUser.Icon.cs @@ -958,7 +958,7 @@ namespace Vanara.PInvoke // lpIconName ); [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("winuser.h", MSDNShortId = "loadicon")] - public static extern SafeHICON LoadIcon(HINSTANCE hInstance, string lpIconName); + public static extern SafeHICON LoadIcon([Optional] HINSTANCE hInstance, string lpIconName); /// /// Loads the specified icon resource from the executable (.exe) file associated with an application instance. @@ -1048,7 +1048,7 @@ namespace Vanara.PInvoke // lpIconName ); [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("winuser.h", MSDNShortId = "loadicon")] - public static extern SafeHICON LoadIcon(HINSTANCE hInstance, ResourceId lpIconName); + public static extern SafeHICON LoadIcon([Optional] HINSTANCE hInstance, ResourceId lpIconName); /// /// Searches through icon or cursor data for the icon or cursor that best fits the current display device.