How to fix “Unresolved import call: Cannot find Add in TestMe.dll” in MQL4 - page 2

 
Chidera Anakpe:
Make sure the platform target is set to x86, if it's set to "Any CPU" MT4 will load the dll but won't find any function within it, it'll only throw an error "Cannot load... " if the platform target is set to x64

Thanks a lot, you nailed it right on the head, I was using "ANY CPU" as the target platform.

Thanks also to everyone who took out their time to respond to this post, you've all been very helpful :), I appreciate.

 
Chidera Anakpe:
Make sure the platform target is set to x86, if it's set to "Any CPU" MT4 will load the dll but won't find any function within it, it'll only throw an error "Cannot load... " if the platform target is set to x64

Hi Chidera Anakpe,


I also encountered the same problem when I was developing the dll package. I also set the execution target to x86, but the problem I encountered could not be solved. I published an article for inquiries. The link is as follows. Don’t know which step went wrong? Thank you.


https://www.mql5.com/en/forum/353293

How To MT4 Call C# DLL Function
How To MT4 Call C# DLL Function
  • 2020.10.13
  • www.mql5.com
Hello everyone~ I want to use MT4 to call the DLL developed by C# But i have a problem I organize my development process below Hope everyone can he...
 
zboo:
 I also set the execution target to x86, but the problem I encountered could not be solved.

some dlls are not so easy to deal with refs as params accepting (those that accept such params) -- C# also needs COM Interop lib in such cases (dlls often interacts with  Windows. as client. as COM_dll )...

Reason: