Thanks for the article. It was interesting.
Although ModIcq is perfectly usable without modification, it is easier to work with the modified version :)
IcqMod.dll cannot be used directly in MT5, because it works with Ansi strings, and in MT5 strings are in Unicode format. Therefore, the project had to be redesigned to work with messages in Unicode (for this purpose, the protocol uses not binary but HTML format). Now, send and receive messages in any language of the world! I hope that the project will be in demand, which will allow to improve it according to your wishes.
IcqMod.dll cannot be used directly in MT5, because it works with Ansi strings, and in MT5 strings are in Unicode format.
Not exactly. It is possible to convert using StringToCharArray. For example, this code works for me
struct ICQ_CLIENT { uchar status; ushort sequence; ulong sock; }; #import "IcqMod.dll" ulong ICQConnect(ICQ_CLIENT& client, uchar& host[], ushort port, uchar& login[], uchar& pass[], int proxy); void ICQClose(ICQ_CLIENT& client); ulong ICQSendMsg(ICQ_CLIENT& client, uchar& uin[], uchar& message[]); ulong ICQReadMsg(ICQ_CLIENT& client, uchar& uin[], uchar& msg[], int& msglen); #import void OnStart() { // convert strings into an array of characters to be passed to the dll uchar login[], password[], server[]; StringToCharArray("123456789", login); StringToCharArray("password", password); StringToCharArray("login.icq.com", server); // connect ICQ_CLIENT client; ICQConnect(client, server, 5190, login, password, 0); for (;;) { uchar uinR[10], msgR[512]; int len = 0; // check for incoming messages ICQReadMsg(client, uinR, msgR, len); if (len > 0) { string uinStr = CharArrayToString(uinR), // sender's UIN msgStr = CharArrayToString(msgR); // message uchar msgS[]; // add before the message Received: and send it back StringToCharArray("Received: " + msgStr, msgS); ICQSendMsg(client, uinR, msgS); } Sleep(100); } }
But it is inconvenient to convert all the time, so your library is much more usable in this sense.
I also thought about proxies. Perhaps there are some settings that will work adequately for a local machine? That is, if we do not use a proxy, then some default settings are set in the proxy and everything works. As an option to make 2 Connect functions in the library - for the variant with and without proxy
The changes made in the library not only affected the type of passed value for strings (it was char* and became wchar_t*). It would be too simple. The format of the transmitted message has changed (see BuildQuery_SendMsg_Unicode function in the source code of the dll), which has become universal (HTML) as opposed to native (binary). The fact that the Russian literals transmitted through IcqMod are received correctly is the merit of the native ICQ programme on which you are testing it. Try testing the reception of Russian messages on http://wap.ebuddy.com/ or an alternative ICQ manager, and you will see scribbles instead of Cyrillic. I have tried a dozen ICQ managers on which my project works correctly not only with Cyrillic, but also with any other language in the world. Sorry, of course, for advertising.
About proxies. I tested, but not local but remote SOCK4/SOCK5. I didn't manage to work with them. That's why I decided not to use them at all in the project. If necessary, I will try to do it.Thank you! That was very clear.
So, I haven't visited this thread for a long time. My icq_power.mqh does not compile, it says *2 Cpp compiler 02:50:00 MS Visual Studio compiler is not installed in the system or failed initialising the compiler*.
What could it mean?
So, I haven't visited this thread for a long time. My icq_power.mqh does not compile, it says *2 Cpp compiler 02:50:00 MS Visual Studio compiler is not installed in the system or failed initialising the compiler*.
What could it mean?
it means that
MS Visual Studio compiler is not installed in the system
or
failed initializing the compiler
What would that mean?
Try to test the reception of Russian messages on http://wap.ebuddy.com/ or an alternative ICQ manager, and you will see scribbles instead of Cyrillic. I have tried a dozen ICQ managers, on which my project works correctly not only with Cyrillic, but also with any other language of the world. Sorry, of course, for advertising.
2 questions:
1) Does it still work on x32 systems? (I don't have a chance to check it).
2) No one has not redesigned for x64? (under x64 does not work) .
I will be very grateful for the answer. I tried to remake it - it didn't work - when I work, it crashes
2013.11.07 02:14:24 icq_demo (EURUSD.m,M1) Status_RECV_ERRORPS: Need exactly ICQ...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Connection of Expert Advisor with ICQ in MQL5 is published:
This article describes the method of information exchange between the Expert Advisor and ICQ users, several examples are presented. The provided material will be interesting for those, who wish to receive trading information remotely from a client terminal, through an ICQ client in their mobile phone or PDA.
Author: Андрей