EssLoginSetPassword() logs in a user, and changes the password. Use this function if the password expires, or must be changed at the next login.
ESS_FUNC_M EssLoginSetPassword() (hInstance, Server, UserName, Password, NewPassword, pDbCount, ppDbList, phCtx);
| ESS_HINST_T | HInstance |
| ESS_STR_T | Server |
| ESS_STR_T | UserName |
| ESS_STR_T | Password |
| ESS_STR_T | NewPassword |
| ESS_PUSHORT_T | pDbCount |
| ESS_PPAPPDB_T | ppDbList |
| ESS_PHCTX_T | phCtx |
| hInstance | Essbase API instance handle |
| Server | Network server name |
| UserName | User name |
| Password | Old password |
| NewPassword | New password |
| pDbCount | Number of accessible databases |
| ppDbList | Address of the pointer to an array of accessible application-database structures |
| phCtx | Pointer to the Essbase context handle |
If successful, EssLoginSetPassword() returns:
Before you call EssLoginSetPassword(), call EssInit() to initialize the API, and obtain a valid instance handle.
ESS_FUNC_M
ESS_LoginSetPassword (ESS_HINST_T hInst)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_HCTX_T hCtx;
ESS_USHORT_T Items;
ESS_USHORT_T ind;
ESS_PAPPDB_T pAppsDbs = NULL;
ESS_STR_T SvrName;
ESS_STR_T User;
ESS_STR_T Password;
ESS_STR_T NewPassword;
SvrName = "POPLAR";
User = "Joseph";
Password = "Password";
NewPassword = "NewPassword";
sts = EssLoginSetPassword (hInst, SvrName, User, Password, NewPassword
&Items, &pAppsDbs, &hCtx);
if (!sts)
{
for (ind = 0; ind < Items; ind++)
{
if ((pAppsDbs+ind) != NULL)
{
if ((pAppsDbs[ind].AppName != NULL) &&
(pAppsDbs[ind].DbName != NULL))
{
printf ("%s\r\n", pAppsDbs[ind].AppName);
printf ("%s\r\n", pAppsDbs[ind].DbName);
}
}
}
if (pAppsDbs)
EssFree(hInst,pAppsDbs);
}
return(sts);
}
EssAutoLogin()
EssInit()
EssListDatabases
EssLogout()
EssSetActive()