The question is in the mql4 topic and I didn't immediately realise it was a question about mql5. There is no such thing in mql4.
Have you made a test dll?
At first I did it for 4, but now it is for 5 and there is the same error, no function is found in dll.
#property strict
#import "C:\Users\Андрей\source\repos\ConsoleAppForMql\TestLib\bin\Debug\TestLib.dll"
int Inc();
#import
int OnInit(){
Print(" до вызова Inc()");
int x = Inc();
Print(" Inc() "+ (string)x);
return(INIT_SUCCEEDED);}
void OnDeinit(const int reason){
}
void OnTick(){
}
First I did it for 4, but now it's for 5, and there is the same error, no function in dll
Andrei, pay attention to these words in the documentation
Не рекомендуется использовать полностью квалифицированное имя загружаемого модуля вида Drive:\Directory\FileName.Ext.
Библиотеки MQL4 загружаются из папки terminal_dir\MQL4\Libraries.
Если библиотека не была найдена, то производится попытка загрузить библиотеку из папки terminal_dir\experts.
it's written in mql5 documentation too. Consequently, the .dll should be in the Libraries folder. Isn't it?
I can't decide yet if I am doing it incorrectly by the above example or the example is wrong.
Let's start from the beginning. What is the library you are creating for? It should be under .Net, it's indicated in the docs, by the way, and it works correctly under it. Under .Core and UWP you can try, I'm too lazy to try it myself, tell me later.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I haven't been able to import the functions yet, I described the problem in the first post on the previous page.
I'm trying to do it in a different way, as in the help
https://www.mql5.com/ru/docs/basis/preprosessor/import
I don't get it yet, I'm doing it in a wrong way, or it's not the right example.
The question is in mql4, so I don't understand it immediately, that it is a question of mql5. There is no such a thing in mql4.
Have you made a test dll?
The question is in the mql4 topic and I didn't immediately realise it was a question about mql5. There is no such thing in mql4.
Have you made a test dll?
What is there no such a thing?
The question is in the mql4 topic and I didn't immediately realise it was a question about mql5. There is no such thing in mql4.
Have you made a test dll?
At first I did it for 4, but now it is for 5 and there is the same error, no function is found in dll.
#property strict #import "C:\Users\Андрей\source\repos\ConsoleAppForMql\TestLib\bin\Debug\TestLib.dll" int Inc(); #import int OnInit(){ Print(" до вызова Inc()"); int x = Inc(); Print(" Inc() "+ (string)x); return(INIT_SUCCEEDED);} void OnDeinit(const int reason){ } void OnTick(){ }The example is not correct!
I started with these articles
https://www.mql5.com/ru/articles/249
https://www.mql5.com/ru/articles/5563
Thanks, I'll chew on it.
If there is a working example, I think it would make it very easy.
Thanks, I'll chew on it.
If there's a working example, I think it would make it very easy.
I already wrote
first post.
I already wrote
the first post.
Thanks, haven't finished it yet.
Thanks, haven't finished reading it yet.
Here's a good source code for an example.
My remaining DLL questions were solved here
What isn't there?
The kind shown in Andrei's picture.
First I did it for 4, but now it's for 5, and there is the same error, no function in dll
Andrei, pay attention to these words in the documentation
it's written in mql5 documentation too. Consequently, the .dll should be in the Libraries folder. Isn't it?
I haven't been able to import the functions yet, I described the problem in the first post on the previous page.
I'm trying to do it in a different way, as in the help
https://www.mql5.com/ru/docs/basis/preprosessor/import
I can't decide yet if I am doing it incorrectly by the above example or the example is wrong.
Let's start from the beginning. What is the library you are creating for? It should be under .Net, it's indicated in the docs, by the way, and it works correctly under it. Under .Core and UWP you can try, I'm too lazy to try it myself, tell me later.