Debugging the DLL? In MT4 and MT5 - page 16

 

Guys, maybe this is not the right question to ask, but I too have a problem with the library in version 5.

In version 4 everything worked and works, but in version 5 it doesn't want to.

Maybe someone can help.

I am calling the function from a DLL, which returns the text to me, in 4 version, I see the text normally, while in version 5 - CRAZYBLES.

I write the DLL in DELPHI (pchar type fname).

In the code I assign a variable string.

Please advise what I do wrong.

 
stongbar:

Guys, maybe this is not the right question to ask, but I too have a problem with the library in version 5.

In version 4 everything worked and works, but in version 5 it doesn't want to.

Maybe someone can help.

I am making call to function from DLL, it returns the text to me, in 4 version I see the text normally, but in 5 version it is BACKGROUND.

I write DLL in DELPHI (pchar type fname).

In code I assigned string to the variable.

Please help what i am doing wrong.

It must be something with encoding. Check open file flags.

open_flags

[in] комбинация флагов, определяющая режим работы с файлом. Флаги определены следующим образом: 
FILE_READ файл открывается для чтения 
FILE_WRITE файл открывается для записи 
FILE_BIN двоичный режим чтения-записи (без преобразования из строки и в строку) 
FILE_CSV файл типа csv (все записанные элементы преобразуются к строкам соответствующего типа, unicode или ansi, и разделяются разделителем) 
FILE_TXT простой текстовый файл (тот же csv, однако разделитель не принимается во внимание) 
FILE_ANSI строки типа ANSI (однобайтовые символы) 
FILE_UNICODE строки типа UNICODE (двухбайтовые символы) 
FILE_SHARE_READ совместный доступ по чтению со стороны нескольких программ 
FILE_SHARE_WRITE совместный доступ по записи со стороны нескольких программ 
FILE_COMMON расположение файла в общей папке всех клиентских терминалов

 
Try replacing PChar with PWideChar (this should help) or PAnsiChar (unlikely). You may also need to tweak the code
 
notused:
Try replacing PChar with PWideChar (this should help)
I fully support the previous speaker
 
Academic:

The debugging issue is solved quite easily:

Approximately this:

Create a server program,

For Delphi, it goes like this:

Put a TcpServer component on the form.

type in its settings when opening (localHost, LocalPort and active property set to true)

this component has a handler that responds when data is received via socket

In this handler, there is the ClientSocket:

text_from_klient := ClientSocket.Receiveln

you got the text, debug it as much as you want

now about how to pass the text (you can do more than just text, but you'll find it if you need)

You call a DLL in your EA, and this DLL passes parameters to a specific socket,

for this, you can put the TcpClient component in the dll, configure it (remoteHost, remotePort, and you call connect )

Transmit via SendLn function, receive via Receiveln.

So you have to keep the server up and running to debug it, but that's not a big problem.

All you need to do is write a dll for sending the info to a socket and write a server program,

The only thing you will have to do is write a 30 line server program that will call your already written (or freshly written) dll and tweak indicators a bit,

but for indicators you can create a template for this,

P.S. you won't be able to debug the DLL, nothing prevents us from passing data from the unbootable DLL into a separate

program, which you can freely debug :)

 

mql5:

It is now impossible to create malicious EX5 at the language level.
That's a very, very bold statement. :) I wonder... What is meant by the phrase "creating malicious EX5"?
 
ir0407:
That's a very, very bold statement. :)
What's so damaging already written? ;)
 

In this case, maliciousness needs to be considered from a different angle. If there is a separate, authorised topic, we could discuss

 
Interesting:

That's if lamers did the protection, but in fact (with a competent approach to protection) it's 10 and 100 times more expensive (in terms of time and effort).

In a couple of weeks, right now...

On the web, there are already a pile of articles about how to substitute the certificate for the terminal; about how the network protocol is organized and how to exchange information with the server (without the terminal);

on every corner is information about API (at least "not for trading", but for information analysis); surely everyone knows what is stored in system exe and dll (and the main thing is how to work with it all).

And in conclusion we all have long been trading on our own terminals, and poor MQ and DC...

Don't make me laugh.

It's a simple task - to receive a list of news from the server that sends them to the terminal. I don't know how to use it, I will try to find a solution for MT4 (if you have experience of such cases, create a "news client").

The developers have directly stated, that there will be no debugging of DLL and why. At least it's not logical to ask them to deliberately worsen their code encryption system, it would immediately lead to attempts to create a decompiler for ex5 (which is EXACTLY what was stated).

But the method of hacking ex4 will not work here, because the language is totally different and its object stuffing will not be so easy to bend to the templates "hacking" ex4.

PS

You're right, it's better to talk about the hacking system with the pros doing it. True, I'm afraid that they are unlikely to talk to us about it, because (maybe I'm wrong) none of us are competent in this field...
I wonder where is that much information on the internet about how to tamper with a certificate?