When I tested my custom developed brokers plugin, I’ve got strange behaviour of BrokerAccount() dll function.

I put in this function body first line code like this:

if (!Account) BrokerError("Account variable is empty!");

and every time when Zorro call this function Account variable is empty!

In BrokerLogin() function I successfully login to the brokers engine and fill Accounts char[1024] array with list of null terminated accounts from my broker. To be sure Account array filed precisely, I even put this line of code before return:

BrokerError(Account);

DLLFUNC int BrokerLogin(char* User, char* Pwd, char* Type, char* Account)
{
//after login and get data from brokers engine
BrokerError(Account); // verify Account array filed precisely
}

DLLFUNC int BrokerAccount(char* Account, double *pdBalance, double *pdTradeVal, double *pdMarginVal)
{
if (!Account) BrokerError("Account variable is empty!");;
}