public static extern bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, ref UnsafeNativeMethods.MENUBARINFO mbi);
internal static bool GetMenuBarInfo(NativeMethods.HWND hwnd, int idObject, uint item, ref UnsafeNativeMethods.MENUBARINFO mbi) { bool result = NativeMethodsSetLastError.GetMenuBarInfo(hwnd, idObject, item, ref mbi); int lastWin32Error = Marshal.GetLastWin32Error(); if (!result) { ThrowWin32ExceptionsIfError(lastWin32Error); } return(result); }