EssAutoLogin
Description
EssAutoLogin() displays a dialog box that allows the user
to log in to an Essbase server, and optionally select an active
application and database.
Syntax
ESS_FUNC_M EssAutoLogin (hInstance, Server, UserName,
Password, AppName, DbName, Options, pAccess, phCtx);
ESS_HINST_T | hInstance |
ESS_SVRNAME_T | Server |
ESS_USERNAME_T | UserName |
ESS_PASSWORD_T | Password |
ESS_ APPNAME _T | AppName |
ESS_ DBNAME _T | DbName |
ESS_USHORT_T | Options |
ESS_PACCESS_T | pAccess |
ESS_PHCTX_T | phCtx |
Parameters
hInstance | Essbase API instance handle |
Server | Network server name string |
UserName | User name string |
Password | Password string |
AppName | Application name |
DbName | Database name |
Options | Options flag. Values:
AUTO_NODIALOG: Attempts to log the user in without displaying the dialog, using the default settings (from the above arguments).
AUTO_NOSELECT: Allows the user to log in without selecting an application and database (lower part of the dialog is not displayed).
You can use both AUTO_NODIALOG and AUTO_NOSELECT with an OR operator (|) to log in a user without a dialog box and not select an application and database.
AUTO_NODIALOG|AUTO_NOSELECT
AUTO_DEFAULT: Allows the user to log in and select an application and database interactively in the dialog box.
|
pAccess | Address of variable to receive database access level.
|
phCtx | Address of variable to receive Essbase context handle. Set to ESS_INVALID_HCTX unless you are reusing an existing (valid) context handle to log in again.
|
Return Value
If successful, returns an Essbase context handle in phCtx, which
can be passed as an argument in subsequent calls to other API
functions. Also returns the user's access level to the selected
application and database (if selected) in pAccess.
Notes
- The dialog box is automatically managed by the function, and provides
features in the login dialog to change the user password, display the
database note message, etc., and so provides a standardized and powerful
login screen for all applications using the API.
- Use this function instead of the EssLogin() function if you are
programming in the Windows or Windows NT environments.
- The function should be called after executing a successful call to
EssInit(), and prior to making any other API calls which require
a context handle argument.
- This function is supported only in the Windows 95 and Windows NT environments.
It is not supported in UNIX environments.
- The string arguments Server, UserName, Password,
AppName or DbName may optionally be NULL. If any of them
are not NULL, the buffers they point to are updated when the function
returns the actual values selected by the user from the dialog box.
If any of the passed in arguments point to valid strings, they will
be used as the default displayed values in the dialog. The buffers
for these arguments must be large enough to contain any possible
return value, not just the values passed in.
- If the login is successful, the server and user names are automatically
stored (in the file ESSBASE.INI) and are used as the defaults the next
time this function is called (unless those arguments are specified in
subsequent calls). The names of all servers which have been successfully
connected to are also stored and displayed.
- The auto login dialog box is a child window of the current active window
(the window that has the focus). Therefore avoid destroying the active
window or changing focus while the auto login dialog is displayed.
- This function returns a value of ESS_STS_CANCEL if the user presses the
Cancel button or the Esc key in the dialog box.
- In the Windows or NT environments, if the end user clicks the Help button,
the ESSAPIW.HLP file is opened and the corresponding topic appears. You can
redirect the Help button to point to a different help file by specifying a
different help file name in the ESS_INIT_T structure.
Access
Before calling this function, you must first initialize the API and obtain a valid instance handle by calling the EssInit() function.
See Also
EssInit()
EssListDatabases()
EssLogin()
EssLogout()
EssSetActive()