This library is not correct. Try the following:
string s;
s = CharToStr(65);
s = s + CharToStr(0);
s = s + CharToStr(66);
// in s variable will be "AB" not "A\x00B" (without 0 byte in the middle)! Therefore this code can not be valid.
How can I concatenate zero char in string? I am using MT4 4.00 build 218.
Thank you,
Milan
This library is not correct. Try the following:
string s;
s = CharToStr(65);
s = s + CharToStr(0);
s = s + CharToStr(66);
// in s variable will be "AB" not "A\x00B" (without 0 byte in the middle)! Therefore this code can not be valid.
How can I concatenate zero char in string? I am using MT4 4.00 build 218.
Thank you,
Milan
Thanks for this code, it's working nicely.
Is there any way to prevent the compile warnings? I'm seeing five occurrences of 'possible loss of data due to type conversion'.
Thanks.
Do not use this library.
There is standard functionality for this:
int h = FileOpen("/screenshot/"+filename, FILE_BIN|FILE_READ); FileReadArray(h, binarray, 0 , WHOLE_ARRAY); ArrayInitialize(key, 0x00); if(CryptEncode(CRYPT_BASE64, binarray, key, base64array) == 0) Print("Error encoding = ", GetLastError()); YOUR BASE64 String > CharArrayToString(base64array);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Base64:
Author: Renat Fatkhullin