libmysql.dll on MT4 via Wine

 

Hi

I'm trying to use the libmysql.dll in an EA, similar to https://www.mql5.com/ru/code/10645

My setup is MT4 via Wine on Ubuntu (32 bit), and I only copied the libmysql.dll file into the MT4 libraries directory, no header files copied along.

The dll file is from the dev.mysql website

At mysql=mysql_init(mysql), I get "Unhandled exception 0x80000100"

How can I figure out what this exception is?

Thanks.

--Shadi
 
 
You've updated to build 6xx. All strings are now Unicode. Does your call accept Unicode or old ANSI?
 

@oddpip, thanks for the link. I posted my question there, and I'm updating from Wine 1.4 to 1.6 in case that'll help.

@WHRoeder, thanks for the hint. mysql_init is a function with an int parameter, not a string parameter, and there are no function calls to any function in the libmysql.dll library prior to the mysql_init function call. The article http://www.forexfactory.com/attachment.php?attachmentid=1362818&d=1391574812 (Major MetaTrader 4 Build 600 Update Released - Articles - MetaQuotes Software Support Center) on page 17 suggests that ANSI versus Unicode is only relevant to function calls with string parameters. In any case, I don't see any option in Metaeditor to change the character encoding.

I'd like to highlight though that my question is about _how_ I can figure out what the exception code 0x80000100 stood for. e.g. is there a way to use the debugger to show more details? are there any logs that can show more details?

 
So I fixed this by downloading the portable zip file of Heidisql (8.3) and using the libmysql.dll file from there. I had read on some forum that it could be that the runtime of the dll file downloaded from the dev.mysql website (c connection 6.1) is mismatching with that used upon compilation of MT4
Reason: