Previous Topic: HINT32 SetBroker(LPCTSTR szBrokerName)

Next Topic: HINT32 Login(LPCTSTR szUserName, LPCTSTR szPassword)


HINT32 Login(LPCTSTR szBrokerName, LPCTSTR szUserName, LPCTSTR szPassword)

Logs into the specified CA Harvest SCM Broker.

Note: If password has expired, the return code will be nonzero and no valid context will be available. However, when password policy allows the changing of an expired password, the ChangePassword method will work. After the password is successfully changed, a valid context and session are available. GetLastMessage will retrieve the message from the server for why login failed

Owning Class

CaHarvest

Arguments

LPCTSTR szBrokerName - The name of the CA Harvest SCM Broker

LPCTSTR szUserName - The User Name

LPCTSTR szPassword - The Password

Return Value

Returns zero if success, nonzero if failure or password policy invocation.

Example

CaHarvest Harvest;
if(Harvest.Login(“CMBroker”, “CMUser”, “MyPassword")) throw CaException(false, “Bad Login”);

More information: