DLL calls and “strict” property in CodeBase publications!

 

I was in the process of updating some of my older CodeBase publications, in this case it was the Spread Tracker for MetaTrader 4, but the new code testing feature rejects it because it makes use of DLL calls, which for this particular case, is absolutely necessary in order to keep the Offline Chart active and ticking away. It also requires the “strict” property, but that I can easily fix.

When did these new rules come into effect in regards to the CodeBase?

I don’t seem to be finding any page for CodeBase rules, and on the “Code Guidelines” page, there is no mention about these two requirements.

Does this mean, that we can no longer submit code that makes DLL calls at all?

 
Fernando Carreiro :


The use of DLLs is prohibited in CodeBase and the Market.

 
Vladimir Karputov #: The use of DLLs is prohibited in CodeBase and the Market.

I can understand that DLL not be allowed in the Market and on MQ VPS due to security risks, but the CodeBase is for sharing open-source code.

Both MQL4 and MQL5 allow the use of DLL for expanding and extending its functionality.

There are many Articles and old code in the CodeBase that actively make use of it and promote it, so why is it now prohibited to share open-source code that makes legitimate use of normal MQL/DLL functionality and behaviour?

That makes absolutely no sense what-so-ever to do so in the CodeBase which is for sharing open-source code.

 
Fernando Carreiro # :

I can understand that DLL not be allowed in the Market and on MQ VPS due to security risks, but the CodeBase is for sharing open-source code.

Both MQL4 and MQL5 allow the use of DLL for expanding and extending its functionality.

There are many Articles and old code in the CodeBase that actively make use of it and promote it, so why is it now prohibited to share open-source code that makes legitimate use of normal MQL/DLL functionality and behaviour?

That makes absolutely no sense what-so-ever to do so in the CodeBase which is for sharing open-source code.

You have the right to have your opinion on any issue, but the reality is this: DLLs are prohibited in both the Market and CodeBase.

 
Vladimir Karputov #:You have the right to have your opinion on any issue, but the reality is this: DLLs are prohibited in both the Market and CodeBase.

Then can you please explain why it is that the following publication was allowed if it also uses DLL calls?

It was published today (2022.04.21 07:3) and the author submitted an empty source code file and placed the real source code in the description, in order to circumvent the DLL call prohibition.

Would that not be a violation too of those rules?

 
Fernando Carreiro # :

Then can you please explain why it is that the following publication was allowed if it also uses DLL calls?

It was published today (2022.04.21 07:3) and the author submitted an empty source code file and placed the real source code in the description, in order to circumvent the DLL call prohibition.

Would that not be a violation too of those rules?

I answered twice above. The discussion has been terminated.

 
Vladimir Karputov #: I answered twice above. The discussion has been terminated.

So, you are telling me to "cheat the system", in the same way as the example I gave you. In other words, you are telling me that I should put an empty file and place my code in the description.

Is that what a moderator is telling me to do? Can you confirm please, that you as a moderator are telling me to "cheat" and violate the rules?

 
Fernando Carreiro #:

So, you are telling me to "cheat the system", in the same way as the example I gave you. In other words, you are telling me that I should put an empty file and place my code in the description.

Is that what a moderator is telling me to do? Can you confirm please, that you as a moderator are telling me to "cheat" and violate the rules?

To circumvent this limitation, I put an empty file to bypass the check.

https://www.mql5.com/en/code/25650

Close-All
Close-All
  • www.mql5.com
A script to close all market positions and/or pending orders.
 
I suggest using an #ifdef to have the DLL as an option that needs enabling by the user by #define.

I would not see this as cheating the system. At least for my understanding, as it requir s the user to enable this optional code actively.

For sure it is somehow senseless to restrict even cod base uploads. In the end, I guess most users will begin to move to GitHub to publish their code.

Also it would be nice, if users could contribute to code base projects, similar to GitHub or any other source management system.


 
Dominik Christian Egert #: I suggest using an #ifdef to have the DLL as an option that needs enabling by the user by #define.

I was actually thinking the same thing but I have not tested it out to see if their testing accepts that or not!

Dominik Christian Egert #: I would not see this as cheating the system. At least for my understanding, as it requir s the user to enable this optional code actively. For sure it is somehow senseless to restrict even cod base uploads.

Yes, I find the whole thing a bit senseless, blocking it in one way and then turning a blind eye to the "cheating" on the other. It seems absurd, but it is what it is.

Dominik Christian Egert #: Also it would be nice, if users could contribute to code base projects, similar to GitHub or any other source management system.

That is already available, as there are already many public projects available in the MQL5 Storage that anyone can connect to in MetaEditor. The only problem is that there is no homepage for the each projects for descriptions and discussions. Maybe the ideal solution is a CodeBase publication with an empty file and a reference to the Public Project in MetaEditor. That will also do away with the limitations on DLL and such and allow for large projects.


 
I tested the #ifdef and that works.

The idea with an empty project and a shared storage is a quite nice approach. I think I'll try that on my two code base contributions.

Thanks for the idea.
Reason: