From 12141775f36f3a65cf7e6f4c4c20fa6963c60c10 Mon Sep 17 00:00:00 2001 From: Tr4Dr Date: Sun, 17 Sep 2017 22:05:56 +0200 Subject: [PATCH] Fixed type casting to __int64 [MT5] long long type should be an alternative. --- MT5Connector/MT5Connector.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MT5Connector/MT5Connector.cpp b/MT5Connector/MT5Connector.cpp index 78d279f8..a1f4bdd5 100755 --- a/MT5Connector/MT5Connector.cpp +++ b/MT5Connector/MT5Connector.cpp @@ -278,7 +278,7 @@ _DLLAPI int _stdcall getStringValue(int expertHandle, int paramIndex, wchar_t* r _DLLAPI int _stdcall getULongValue(int expertHandle, int paramIndex, unsigned __int64* res, wchar_t* err) { return Execute([&expertHandle, ¶mIndex, res]() { - *res = (unsigned long)MtAdapter::GetInstance()->GetCommandParameter(expertHandle, paramIndex); + *res = (unsigned __int64)MtAdapter::GetInstance()->GetCommandParameter(expertHandle, paramIndex); return 1; }, err, 0); } @@ -286,7 +286,7 @@ _DLLAPI int _stdcall getULongValue(int expertHandle, int paramIndex, unsigned __ _DLLAPI int _stdcall getLongValue(int expertHandle, int paramIndex, __int64* res, wchar_t* err) { return Execute([&expertHandle, ¶mIndex, res]() { - *res = (long)MtAdapter::GetInstance()->GetCommandParameter(expertHandle, paramIndex); + *res = (__int64)MtAdapter::GetInstance()->GetCommandParameter(expertHandle, paramIndex); return 1; }, err, 0); } @@ -306,4 +306,4 @@ _DLLAPI int _stdcall getUIntValue(int expertHandle, int paramIndex, unsigned int *res = (unsigned int)MtAdapter::GetInstance()->GetCommandParameter(expertHandle, paramIndex); return 1; }, err, 0); -} \ No newline at end of file +}