Func _GUICtrlMenu_GetItemText($hMenu, $iItem, $fByPos = True)
Local $iByPos = 0
Local $x64 = ''
If StringInStr(@OSArch, '64') Then
$x64 = '64'
EndIf
If $fByPos Then $iByPos = $MF_BYPOSITION
Local $aResult = DllCall("User32.dll", "int" & $x64, "GetMenuStringW", _
"handle", $hMenu, "uint" & $x64, $iItem, "wstr", 0, "int" & $x64, 4096, "uint" & $x64, $iByPos)
If @error Then Return SetError(@error, @extended, 0)
Return SetExtended($aResult[0], $aResult[3])
EndFunc