@@ -74,17 +74,17 @@ public void Add(FuncItem funcItem)
74
74
RtlMoveMemory ( newPointer , _nativePointer , oldSize ) ;
75
75
Marshal . FreeHGlobal ( _nativePointer ) ;
76
76
}
77
- IntPtr ptrPosNewItem = ( IntPtr ) ( ( int ) newPointer + oldSize ) ;
77
+ IntPtr ptrPosNewItem = ( IntPtr ) ( newPointer . ToInt64 ( ) + oldSize ) ;
78
78
byte [ ] aB = Encoding . Unicode . GetBytes ( funcItem . _itemName + "\0 " ) ;
79
79
Marshal . Copy ( aB , 0 , ptrPosNewItem , aB . Length ) ;
80
- ptrPosNewItem = ( IntPtr ) ( ( int ) ptrPosNewItem + 128 ) ;
80
+ ptrPosNewItem = ( IntPtr ) ( ptrPosNewItem . ToInt64 ( ) + 128 ) ;
81
81
IntPtr p = ( funcItem . _pFunc != null ) ? Marshal . GetFunctionPointerForDelegate ( funcItem . _pFunc ) : IntPtr . Zero ;
82
82
Marshal . WriteIntPtr ( ptrPosNewItem , p ) ;
83
- ptrPosNewItem = ( IntPtr ) ( ( int ) ptrPosNewItem + IntPtr . Size ) ;
83
+ ptrPosNewItem = ( IntPtr ) ( ptrPosNewItem . ToInt64 ( ) + IntPtr . Size ) ;
84
84
Marshal . WriteInt32 ( ptrPosNewItem , funcItem . _cmdID ) ;
85
- ptrPosNewItem = ( IntPtr ) ( ( int ) ptrPosNewItem + 4 ) ;
85
+ ptrPosNewItem = ( IntPtr ) ( ptrPosNewItem . ToInt64 ( ) + 4 ) ;
86
86
Marshal . WriteInt32 ( ptrPosNewItem , Convert . ToInt32 ( funcItem . _init2Check ) ) ;
87
- ptrPosNewItem = ( IntPtr ) ( ( int ) ptrPosNewItem + 4 ) ;
87
+ ptrPosNewItem = ( IntPtr ) ( ptrPosNewItem . ToInt64 ( ) + 4 ) ;
88
88
if ( funcItem . _pShKey . _key != 0 )
89
89
{
90
90
IntPtr newShortCutKey = Marshal . AllocHGlobal ( 4 ) ;
@@ -103,15 +103,15 @@ public void RefreshItems()
103
103
{
104
104
FuncItem updatedItem = new FuncItem ( ) ;
105
105
updatedItem . _itemName = _funcItems [ i ] . _itemName ;
106
- ptrPosItem = ( IntPtr ) ( ( int ) ptrPosItem + 128 ) ;
106
+ ptrPosItem = ( IntPtr ) ( ptrPosItem . ToInt64 ( ) + 128 ) ;
107
107
updatedItem . _pFunc = _funcItems [ i ] . _pFunc ;
108
- ptrPosItem = ( IntPtr ) ( ( int ) ptrPosItem + IntPtr . Size ) ;
108
+ ptrPosItem = ( IntPtr ) ( ptrPosItem . ToInt64 ( ) + IntPtr . Size ) ;
109
109
updatedItem . _cmdID = Marshal . ReadInt32 ( ptrPosItem ) ;
110
- ptrPosItem = ( IntPtr ) ( ( int ) ptrPosItem + 4 ) ;
110
+ ptrPosItem = ( IntPtr ) ( ptrPosItem . ToInt64 ( ) + 4 ) ;
111
111
updatedItem . _init2Check = _funcItems [ i ] . _init2Check ;
112
- ptrPosItem = ( IntPtr ) ( ( int ) ptrPosItem + 4 ) ;
112
+ ptrPosItem = ( IntPtr ) ( ptrPosItem . ToInt64 ( ) + 4 ) ;
113
113
updatedItem . _pShKey = _funcItems [ i ] . _pShKey ;
114
- ptrPosItem = ( IntPtr ) ( ( int ) ptrPosItem + IntPtr . Size ) ;
114
+ ptrPosItem = ( IntPtr ) ( ptrPosItem . ToInt64 ( ) + IntPtr . Size ) ;
115
115
116
116
_funcItems [ i ] = updatedItem ;
117
117
}
0 commit comments