From 262fb3ff3ad75afeae3b63a94823f1d7f9d3b3ad Mon Sep 17 00:00:00 2001 From: dahall Date: Fri, 25 Sep 2020 17:15:47 -0600 Subject: [PATCH] Fixed bug in IContextMenu3.HandleMenuMsg2 declaration --- PInvoke/Shell32/ShObjIdl.IContextMenu.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PInvoke/Shell32/ShObjIdl.IContextMenu.cs b/PInvoke/Shell32/ShObjIdl.IContextMenu.cs index 594761f4..3dca9193 100644 --- a/PInvoke/Shell32/ShObjIdl.IContextMenu.cs +++ b/PInvoke/Shell32/ShObjIdl.IContextMenu.cs @@ -404,7 +404,7 @@ namespace Vanara.PInvoke /// /// The address of an LRESULT value that the owner of the menu will return from the message. This parameter can be NULL. /// - void HandleMenuMsg2(uint uMsg, IntPtr wParam, IntPtr lParam, IntPtr result); + void HandleMenuMsg2(uint uMsg, IntPtr wParam, IntPtr lParam, out IntPtr result); } /// @@ -750,6 +750,17 @@ namespace Vanara.PInvoke /// member is not valid prior to Internet Explorer 4.0. /// public System.Drawing.Point ptInvoke; + + /// + /// Initializes a new instance of the struct with a menu-identifier offset of the command to + /// carry out. + /// + /// The menu-identifier offset of the command to carry out. + public CMINVOKECOMMANDINFOEX(int commandId) : this() + { + cbSize = (uint)Marshal.SizeOf(this); + lpVerb = commandId; + } } } } \ No newline at end of file