Unable to load DLL.

 
I have a strange issue.
I have written a DLL for MT located at http://s95010189.onlinehome.us/mt/mtq/ to enable simple mysql access, however there is a problem.

The DLL works fine on this system (stdcall as needed; import table is correct). However if I take it to any other system, the DLL fails to load with:
2005.08.03 18:03:44	mysql-example EURUSD,M1: cannot load library 'mtq.dll'


Settings are set to enable DLL loading. DLL is located in the Metatrader directory with terminal.exe on all systems.

Any way to solve this problem? Thanks.

 
Mage,

Thanks for writing that MySQL connector script! Unfortunately, I get the same error on my box:

2005.08.03 20:16:35 mysql-example EURUSD,H1: cannot load library 'mtq.dll'

1). I placed mtq.dll in the "C:\Program Files\MetaTrader 4\" folder.
2). I've got "Allow DLL imports" checked.

- Vooch
 
I guess you have to put the dll somewhere in the PATH.
MyPc->Properties->Advanced Options->Enviroment Variables
There you will see the PATH.
 
Matias,

I tried putting it in C:\WINDOWS\SYSTEM32 which I know is in the PATH environment variable and that did NOT work.

Load library also checks the current directory.

- Vooch
 
No, LoadLibrary first checks the current directory for dlls and then searches the PATH. Even if it is in a directory that is in the path that doesn't solve this problem.

You can move it to system32 and it still has this problem.

Again, as I said it works on one system and not the other, same mq4 file, same location for files. Both enabled to access dlls.

Thanks for the reply though.
 
Well I can't help you but wanted to say this is a pretty interesting project.

Could I suggest you pop over to the Yahoo group and ask there ? These guys are into all sorts of stuff and could well assist you greatly in fast tracking this idea.

Well done - please keep us in the loop as to progress (Though I scan Yahoo as well)

Martin
 
Martin,

I think we'll need Slawa's help on this one. I think it's a minor bug inside MT4.

- Vooch
 
Great contribution.

The more I think about it, a MySQL db would act a great go between for information and MT4. Its better than trying to use a txt file or spreadsheet, for certain types of applications.

If this gets to working right, MetaQuotes should pat you on the back.
 
If this gets to working right, MetaQuotes should pat you on the back.


And maybe help out ? :)
 
Well, I searched the Russian forums and didn't find the solution to this problem there.

- Vooch
 
there is special folder for experts libraries (dll is library too). guess. experts/libraries