Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uAnsi2Unicode - function not defined on OTMql4Zmq.mqh #19

Open
mglcampos opened this issue Oct 19, 2016 · 1 comment
Open

uAnsi2Unicode - function not defined on OTMql4Zmq.mqh #19

mglcampos opened this issue Oct 19, 2016 · 1 comment

Comments

@mglcampos
Copy link

Metatrader says it cannot open mql4Zmq.ex4 file. First I fixed the import on the OTMql4Zmq.mq4 expert advisor so it includes OTMql4Zmq.mqh. But then when I compile both .mqh and .mp4 I get errors. "uAnsi2Unicode - function not defined on OTMql4Zmq.mqh"
I used dependency walker to check the mql4zmq.dll and it says: "Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module."
I tried everything from putting all the required .dll's in the same folder or different versions and nothing works
I am working on Linux, running Metatrader 64 bit, build 1010 with wine. I am using the pre-compiled libs from git.

@mglcampos
Copy link
Author

mglcampos commented Oct 20, 2016

I fixed this by creating the function myself, here it is the code below:

string uAnsi2Unicode(int ptrStringMemory)
{
  int szString = lstrlenA(ptrStringMemory);
  uchar ucValue[];
  ArrayResize(ucValue, szString + 1);
  RtlMoveMemory(ucValue, ptrStringMemory, szString + 1);
  string str = CharArrayToString(ucValue);
  LocalFree(ptrStringMemory);
  return str;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant