Help with mtapi.dll

 
I am using fxdd.com which uses the metaquotes software.

They sent me a link for writing my own custom program to autotrade and send orders to their platform. This is what they sent:

"Please download the MetaTrader 3 API from the following link:
https://www.metaquotes.net/en/download "


I can get the MetaTradingAPIExample to connect with their server mts01.fxdd.com. However when I try to login to a demo account using:

int loginid= 403213;
if((err=api.Login(loginid, "vfse2pr"))!=RET_OK)
{
printf("Error logging as '%d': %s\n", loginid, api.GetErrorDescription(err));
return(-1);
}
printf("4. login as '%d'\n", loginid);


I get an "inavlid account". I can login to the demo account manually. I have change the numbers on the above account for privacy reasons but the actual account can be logged into manually. I have repeated this with another demo account but with the same results.

Has anyone tried to use the mtapi.dll to login succesfully. If so, what am I doing wrong?

The fxdd.com folks did not have an answer and directed me to the metaquotes.net forum.
 
I get an "inavlid account".

Please open a new demo account.
 
I found the answer to this. The fxdd.com folks had pointed me to a wrong server. The server should have been mt3d.fxdd.com.

Opening a new demo account did not fix the problem.