I am probably reading this wrong, but it looks like you are asking for help on a Visual Studio compile issue in a forum for MQL4 and MT4. I also see a .cpp file extenstion, which, unless I am mistaken, stands for C++, again, not MQL4.
As far as the issues you are having, it looks like it tells you what is happening in the errors. 'StringToShortArray', 'ArraySize', and 'GetAncestor' are all "undeclared identifier", probably because the code is looking for functions with those names, and not finding them. Those error lines are also telling you where in your code the issues are. I am not sure if your settings are not right, as far as where you are telling the program to look for those files or what. Any possible number of things could be causing things like that, but given that those names seem to be proper language function names, the file location issue sounds to be the most likely cause.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am writing a program to open any offline chart programmatically and this works in recent mql4 builds,
but I need a dll out of this so older builds can use it. Can anyone who is familar with win32 programming help me
fix the 3 or 4 compilation issues ? I am new to windows programming and I don't know much about getting this to work.
All this does is :
1) do a file -> open offline
2) feed the chart name + \t + \r to the input device to open the chart.
Like I said this works just fine on recent builds, now just need a dll. just need to fix a few compilation issues using visual studio.
C:\Program Files\Microsoft Visual Studio\MyProjects\offlinelib\offlinelib.cpp(34) : error C2065: 'StringToShortArray' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\offlinelib\offlinelib.cpp(36) : error C2065: 'ArraySize' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\offlinelib\offlinelib.cpp(182) : error C2065: 'GetAncestor' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\offlinelib\offlinelib.cpp(182) : error C2440: 'initializing' : cannot convert from 'int' to 'struct HWND__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio\MyProjects\offlinelib\offlinelib.cpp(188) : error C2440: 'initializing' : cannot convert from 'char [9]' to 'unsigned short []'
There is no context in which this conversion is possible
Error executing cl.exe.
offlinelib.dll - 5 error(s), 0 warning(s)