Download MetaTrader 5

TerminalInfoString

To add comments, please log in or register
ttechnik
258
ttechnik  
int error=GetLastError();
string a=TerminalInfoString(TERMINAL_DATA_PATH);
error=GetLastError();

After run:

a: valid terminal's path.

But error is 4051, invalid function parameter.


Please help me, who knows why this is.

Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
ttechnik:

After run:

a: valid terminal's path.

But error is 4051, invalid function parameter.


Please help me, who knows why this is.

GetLastError() does not work like it used to . . .

GetLastError

Returns the contents of the system variable _LastError.

int GetLastError();

Returned Value

Returns the value of the last error that occurred during the execution of an mql4 program.

Note

After the function call, the contents of _LastError are not reset. To reset this variable, you need to call ResetLastError().


your error 4051 is coming from somewhere else . . . only test for errors when you need to.
ttechnik
258
ttechnik  
RaptorUK:
GetLastError() does not work like it used to . . .


your error 4051 is coming from somewhere else . . . only test for errors when you need to.

Yes, I know, that, GetLastError() not reset.

New code is give same error, 4051. :)

I wrote the "int error=GetLastError();" pre command. I know, this is not nice.

New code:

ResetLastError();

string a=TerminalInfoString(TERMINAL_DATA_PATH);
int error=GetLastError();
Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
ttechnik:

Yes, I know, that, GetLastError() not reset.

New code is give same error, 4051. :)

I wrote the "int error=GetLastError();" pre command. I know, this is not nice.

New code:


OK, I see what you mean, I get the same issue, please report this to the Service Desk with my test code if you like . . .



Files:
ttechnik
258
ttechnik  
RaptorUK:

OK, I see what you mean, I get the same issue, please report this to the Service Desk with my test code if you like . . .




Where is Service Desk?


http://www.metaquotes.net/en/company/contacts ?

Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
ttechnik:

Where is Service Desk?


http://www.metaquotes.net/en/company/contacts ?

Click the link I gave and follow the instructions.
ttechnik
258
ttechnik  
RaptorUK:
Click the link I gave and follow the instructions.


I follow the link and take to this topic:

Date displayed in the Optimization report

I can't read anything instructions

Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
ttechnik:

I follow the link and take to this topic:

Date displayed in the Optimization report

I can't read anything instructions

The link takes you to this post . . .
RaptorUK 2013.07.12 15:14 |
pipnotic:

I discovered that the html tag <!--TESTSUMMARY--> of the "OptimizationReport.htm" template, which is supposed to contain the date period information among other things, is not working...

I remember to have read about a proper way to log MT4 bugs on the MT5 website. Could someone please send me the link for that, please?! Tried to search for it in the Forum but could not find it...

Logon to the mql5 forum, if you don't have a user ID you will need to register. Once logged in go to your Profile, then on the left hand side of the page there is a link to the Service Desk.

. . . isn't it clear ?
Ex Ovo Omnia
3416
Ex Ovo Omnia  
The link takes you to this post . . .
RaptorUK 2013.07.12 15:14 |
pipnotic:

I discovered that the html tag <!--TESTSUMMARY--> of the "OptimizationReport.htm" template, which is supposed to contain the date period information among other things, is not working...

I remember to have read about a proper way to log MT4 bugs on the MT5 website. Could someone please send me the link for that, please?! Tried to search for it in the Forum but could not find it...

Logon to the mql5 forum, if you don't have a user ID you will need to register. Once logged in go to your Profile, then on the left hand side of the page there is a link to the Service Desk.

Lol, the ban link in your post does nothing I would expect!
Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
Ovo:
Lol, the ban link in your post does nothing I would expect!
It does what it should when I forget to edit the post I quoted
ttechnik
258
ttechnik  
Ovo:
Lol, the ban link in your post does nothing I would expect!

I send it.


Link: //

12
To add comments, please log in or register