Errors, bugs, questions - page 2443

 
Sergey Dzyublik:

Include the source code in .mq5 format as a resource and read the hash of the source code contents.
If you change the source code, the compilation automatically pulls the new source code as a resource and a new hash is calculated.
What is so difficult?

If a comment is added to the source, this does not change the logic of the EA. I.e., it is one and the same EA.

You and Igor offer the most simple solutions. The most elementary thing is to give a hash to itself. A path to itself is given. The hash is clamped for some reason.
 
fxsaber:

I.e. if EX5 is changed, the file names it creates are also changed.

EX5 changes with every compilation. Why then can't the compile time serve as a unique name?

 
fxsaber:

The most basic thing is to give a hash of yourself. A path to the self is given. The hash - for whatever reason - is clamped down.

Your task looks like a puzzle on the "learn software protection" forums, usually it's "how to make an executable write to another folder after you run it".

Usually after you run an executable, the operating system will block access to the file until the application is complete, I think the same situation is with the executable .ex5 - as long as it is running, access to it is denied

HH: I can not do otherwise, I'm trained to split the task into smaller ones, so I proposed to split it into 2 modules - one executable, the second for writing to files, you can connect and 3 modules (libraries)

 
Igor Makanu:

Usually when an executable is run, the operating system blocks access to it until the application is finished, I think the same situation applies to the .ex5 executable - as long as it is run, access to it is denied

No, it is in memory. You can even delete the file, it won't harm your work.

 
fxsaber:

If a comment is added to the source, this does not change the logic of the EA. In other words, it is the same EA.

You and Igor propose the most simple solutions. The most basic one is to give hash to itself. The path to the self is given. The hash is clamped for some reason.

If comments get in the way, remove them with handles before hash calculation.
The main thing is desire, not finding more and more excuses.

 
Sergey Dzyublik:

If comments get in the way, remove them with your hands before calculating the hash.

With this vision of the solution to the problem, you can simply suggest to change the name of the file created by the program by hand in the source.

The main thing is desire, not finding more and more excuses.

The main thing is opportunities.

 
Andrey Khatimlianskii:

EX5 changes with every compilation.

Didn't think of that.

Why can't the compile time serve as a unique name then?

I wanted there to be a reaction to code changes. Apparently the problem is not solved.

 
fxsaber:

I wanted there to be a reaction to code changes. Apparently, the problem is not solved.

Solved by own code analyser (not the easiest).
Manual mode is easier (change version).
 
Andrey Khatimlianskii:
Solved with your own code analyser (not the easiest).

On the developer side, all that is needed is the will, as it takes one minute to do it.

Only need to give hash of native code before "obfuscation" in EX5.

 
fxsaber:

Thank you so much! I'll post the opt job when it's ready.

ZZZ Only 64 characters per path length to the EA - not too few?

Wrong - 128.

Reason: