Skip to content

Commit d74a635

Browse files
committed
use nint instead of ulong
1 parent b45b5fb commit d74a635

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ protected override void WndProc(ref Message m)
103103

104104
if (_oContextMenu != null &&
105105
m.Msg == (int)WM.MENUSELECT &&
106-
(ShellHelper.HiWord(m.WParam) & (ulong)MFT.SEPARATOR) == 0 &&
107-
(ShellHelper.HiWord(m.WParam) & (ulong)MFT.POPUP) == 0)
106+
(ShellHelper.HiWord(m.WParam) & (nint)MFT.SEPARATOR) == 0 &&
107+
(ShellHelper.HiWord(m.WParam) & (nint)MFT.POPUP) == 0)
108108
{
109109
string info = string.Empty;
110110

111-
if (ShellHelper.LoWord(m.WParam) == (int)CMD_CUSTOM.ExpandCollapse)
111+
if (ShellHelper.LoWord(m.WParam) == (nint)CMD_CUSTOM.ExpandCollapse)
112112
info = "Expands or collapses the current selected item";
113113
else
114114
{
@@ -1590,22 +1590,22 @@ internal static class ShellHelper
15901590
/// </summary>
15911591
/// <param name="ptr">The pointer to the WParam</param>
15921592
/// <returns>The unsigned integer for the High Word</returns>
1593-
public static ulong HiWord(IntPtr ptr)
1593+
public static nint HiWord(IntPtr ptr)
15941594
{
1595-
if (((ulong)ptr & 0x80000000) == 0x80000000)
1596-
return ((ulong)ptr >> 16);
1595+
if (((nint)ptr & 0x80000000) == 0x80000000)
1596+
return ((nint)ptr >> 16);
15971597
else
1598-
return (((ulong)ptr >> 16) & 0xffff);
1598+
return (((nint)ptr >> 16) & 0xffff);
15991599
}
16001600

16011601
/// <summary>
16021602
/// Retrieves the Low Word of a WParam of a WindowMessage
16031603
/// </summary>
16041604
/// <param name="ptr">The pointer to the WParam</param>
16051605
/// <returns>The unsigned integer for the Low Word</returns>
1606-
public static ulong LoWord(IntPtr ptr)
1606+
public static nint LoWord(IntPtr ptr)
16071607
{
1608-
return (ulong)ptr & 0xffff;
1608+
return (nint)ptr & 0xffff;
16091609
}
16101610

16111611
#endregion

0 commit comments

Comments
 (0)