Another DLL Error 126 Topic!

 

I realize there are quite a few posts regarding importing dll's and error 126, but I am hoping someone has some input on this. I have created a DLL and am having an error 126 problem. I am calling some functions in my DLL from another DLL. I have made sure all the dependencies are in the folder and when I use "depends.exe" to check, it confirms that all dependencies are fine. There are no broken dependencies. So my question is what could be causing this? When I comment out the "other" dll function calls, it seems to work fine, so I figured that the problem lies in that, but if my dependencies check out why would I get that error?


Thanks,

Scott

 

Everything works if I put ALL of the dependent libraries in the Windows\System32 folder. This doesn't make any sense at all. If I create a standalone application, everything is fine and all the dependent linked libraries are found with no trouble, but if I create a DLL and call it from within MetaTrader, it's clueless. It seems to be a bug with MetaTrader even though it is "technically" a Win32 error. The other Libraries's dependency is fine as is verified using depends.exe and no other program has any issues with it except MetaTrader.


Is there anyone out there that is knowledgable in this area that can explain this to me?


Thanks,

Scott

 

Hi,


I have same problem with my Virtual Desktop (Microsoft Windows Server 2003). I resolved that this way:


It is necessary to disable Data Execution Prevention for the Meta Trader terminal.exe in your virtual desktop.
From the virtual desktop, right-click on 'my computer' and select properties. Then advanced tab->performance and click 'settings' and then 'data execution prevention' tab. Exclude MT4 terminal.exe from DEP.

Reason: