Previous Topic: HINT32 Login(LPCTSTR szBrokerName, LPCTSTR szUserName, LPCTSTR szPassword)

Next Topic: bool GetAuthenticationSetting(enum tAuthenticationServerSettings nSetting)


HINT32 Login(LPCTSTR szUserName, LPCTSTR szPassword)

Logs in to the CA Harvest SCM Broker specified in constructor.

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 szUserName-the User Name

LPCTSTR szPassword-the Password

Return Value

Returns zero if success, nonzero if failure.

Example

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

More information: