Executes login operation – adds a local computer into the account.
The command can be invoked only if the central server has login_required status (refer to FH_GetStatus)
int WINAPI FH_LoginComputerAsync( STR_VAR userEmail, STR_VAR password, int timeoutMs);
- userEmail – e-mail of the registered user
- password – password to the user’s account
- timeoutMs – timeout. By default equals to –1.
The returned value is the ID of the invoked command or 0 in case the command cannot be executed.
The result of the command execution is returned by command_result event.
The error codes upon the command completion:
- “MAX_LIMIT” – the maximum number of users is logged in the account
- “WRONG_PASSWORD” – wrong account password
- “NODE_EXISTS” – the node is already logged in
- “NOT_REGISTERED” – the specified user is not registered
- “CONFIRM_REQUIRED” – the user is inactive
As a result of FH_LoginComputerAsync command execution, the node is successfully logged into the account, otherwise the corresponding error occurs.
In case the maximum number of users is logged in the account according to the current subscription of the user,MAX_LIMIT error is received. To add a new computer in the account, delete all currently added computers from the account using FH_ResetAllComputersAsync command.