The project name is TestDLL
My code in TestDLL.cs is as follows:
Chinese(Traditional)
Then enter the code below
But the following error message appears
And the value calculated by the Add function is also wrong, it should be 667 instead of 102238280
There is a 32-bit requirement for the DLL for MT4. 64 bit does not support.
The MT4 and MT5 VS2017 screenshots are enclosed.
https://www.mql5.com/en/forum/293517#comment_9811172
- 2018.12.04
- www.mql5.com
There is a 32-bit requirement for the DLL for MT4. 64 bit does not support.
The MT4 and MT5 VS2017 screenshots are enclosed.
https://www.mql5.com/en/forum/293517#comment_9811172
Hi Mehmet Bastem~
Thank you for your reply~
Regarding the part you mentioned that MT4 only supports 32-bit
I changed it to x86 to build the dll file in the 4th step:
4.
I am in Build> Configuration Manager
Go modified to use x86 to build the solution
Hi Mehmet Bastem~
Thank you for your reply~
Regarding the part you mentioned that MT4 only supports 32-bit
I changed it to x86 to build the dll file in the 4th step:
4.
I am in Build> Configuration Manager
Go modified to use x86 to build the solution
I still can’t connect at the moment, can anyone help me, thank you~~~
I wonder the problem, I could not fully understand. It works smoothly.
1-Please uninstall NUget packages in VS2017 and reinstall.
2- I tried again in the attachment, there is no problem.
3- Required pictures are attached.
DLL link http://www.haskayayazilim.net/Testme.dll
//+------------------------------------------------------------------+ //| Libdeneme1.mq4 | //| Copyright 2018, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2018, MetaQuotes Software Corp." #property link "https://www.haskayayazilim.net" #property version "1.00" #property strict #include <stdlib.mqh> #include <WinUser32.mqh> #import "testme.dll" int Sub( int Ab1,int Ab2); #import int OnInit() { //--- //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- int num1=4;int num2=7;string result=""; result=Sub(num1,num2); Print("result:",result," input num1:",num1,". num2:",num2); ExpertRemove(); } //+------------------------------------------------------------------+
I wonder the problem, I could not fully understand. It works smoothly.
1-Please uninstall NUget packages in VS2017 and reinstall.
2- I tried again in the attachment, there is no problem.
3- Required pictures are attached.
Hi Mehmet Bastem~
Because I have just come into contact with functional development in this area, many of the questions are relatively basic. Thank you for your patience and careful reply~
I downloaded the DLL file you provided, and it works on my MT4 by the way
I have installed the two packages you mentioned into my project:
UnmanagedExports.Repack
UnmanagedExports.Repack.Upgrade
But I also encountered the same error message:
Or can you provide me with the project file you made?
Thanks for your assistance~
PS。When I finish building the project, do I only need to copy the TestDLL.dll file under the path ..\bin\x86\Debug\TestDLL.dll to the Libraries folder of MT4?
Ok.
please uninstall the NUget packages and reinstall them. Do not use an upgrade.
I sent my own DLL project. In yesterday I posted limdeneme1.mq4 experti to use this DLL. It runs smoothly. I ran a test.
http://www.haskayayazilim.net/Testme32Bit.rar
please chance your expert code this.
#import "TestDLL.dll" int Add(int left,int right); double AddDouble(double xleft,double xright); #importDD function works, AddDouble does not work. in your project. Correct the input parameter names of the AddDouble function. Left input value is defined as int in ADD function, right below the variable defined as int in AddDouble function is defined as double. The DLL is not working, it gives the message that the AddDouble function could not be found due to an error parameter.
Ok.
please uninstall the NUget packages and reinstall them. Do not use an upgrade.
I sent my own DLL project. In yesterday I posted limdeneme1.mq4 experti to use this DLL. It runs smoothly. I ran a test.
http://www.haskayayazilim.net/Testme32Bit.rar
please chance your expert code this.
DD function works, AddDouble does not work. in your project. Correct the input parameter names of the AddDouble function. Left input value is defined as int in ADD function, right below the variable defined as int in AddDouble function is defined as double. The DLL is not working, it gives the message that the AddDouble function could not be found due to an error parameter.Hi Mehmet Bastem~
Thank you for providing the project for me to study. Thank you very much for your kind assistance.
I downloaded the Testme32Bit.rar file and unzipped it.
After decompression is complete, open the project directly and remake the project
But the following error message appeared
How can I solve it?
(It seems that the path cannot be found?)
Thank you~
The "DllExportAppDomainIsolatedTask" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.
The "DllExportAppDomainIsolatedTask" task could not be instantiated from "C:\Users\Afu-Work\Desktop\Testme32Bit\packages\UnmanagedExports.Repack.1.0.4\build\..\tasks\RGiesecke.DllExport.MSBuild.dll". Could not load file or assembly 'RGiesecke.DllExport.MSBuild, Version=1.2.7.38851, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
PS.
I think it should refer to the problem on the path of RGiesecke.DllExport.Metadata
I tried to remove it, but I don’t know how to add it back
How did you join the RGiesecke.DllExport.Metadata reference
Please delete old information from NuGet. then reinstall it. The error seen is NUget packet error. The picture is attached.
Please delete old information from NuGet. then reinstall it. The error seen is NUget packet error. The picture is attached.
Hi Mehmet Bastem~
Thank you for your assistance, let me go one step further~
I followed the steps you provided, when the reconstruction plan is being carried out on the current project side
There are no more error messages
My steps are as follows:
1. From the NuGet package manager of Visual Studio 2017, remove the following two packages
UnmanagedExports.Repack
UnmanagedExports.Repack.Upgrade
2. After saving the project, restart Visual Studio 2017
3. From the NuGet package manager of Visual Studio 2017, reinstall the two packages above
4. After the reconstruction plan, there is no error message at this time
5. Copy the ..\Testme\bin\x86\Debug\Testme.dll file to the Libraries folder of MT4
But I encountered a new problem. When calling the DLL on the MT4 platform, the following error message appeared:
I will attach my DLL file and MT4 MQL4 file
Thanks again for your assistance
Thank you! ~
PS. I have seen many functions under the installed items of NuGet package manager that can be upgraded. Will I need to upgrade each package here?
(I have not upgraded at the moment)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The project name is TestDLL
My code in TestDLL.cs is as follows:
Chinese(Traditional)
Then enter the code below
But the following error message appears
And the value calculated by the Add function is also wrong, it should be 667 instead of 102238280
Thank you everyone! ~
PS.I uploaded the files I made using the visual studio 2017 project with MQL4