|Download Help (Windows Only)|
The log in and log out procedure is implemented as a Front-End callback sequence, in which a sequence you call from the application contains the code that prompts the user for a login and processes the login. Call the LoginLogout Front-End callback when the application starts, when you want to give the user the ability to log in or log out, and when you want the user to log out before you shut down the engine. You call the LoginLogout callback by using the Engine.CallFrontEndCallbackEx method and passing LoginLogout for the sequenceNameParam parameter.
The LoginLogout callback logs out the currently logged-in user. Depending on the value of the arguments in the argumentList parameter, the LoginLogout callback can also log in a new user.
The argumentList parameter to the Engine.CallFrontEndCallbackEx method is a property object that contains a set of subproperties. Each subproperty represents an argument. To create the PropertyObject object for the argumentList parameter, call the Engine.NewPropertyObject method as follows:
NewPropertyObject (PropValType_Container, False, "", 0)
Call the PropertyObject.SetValBoolean method on the newly created PropertyObject to specify the value of the first argument, logoutOnly. You can choose a True or a False setting, as shown in the following examples:
Finally, call the PropertyObject.SetValBoolean method to specify the value of the second argument, isInitialLogin. This argument indicates whether this is the initial login at application startup. The callback uses this information to implement the Automatically Login Windows System User feature for Microsoft Windows.
After you call the Engine.CallFrontEndCallbackEx method, release the PropertyObject you created for the argumentList parameter.
To determine when a log out or log in/log out operation has completed, keep track of the Execution.Id property of the execution the Engine.CallFrontEndCallbackEx method returns. When you receive the UIMsg_EndExecution user interface message, you can use this handle to determine whether the completed execution is the Front-End callback you created. If you know when the LoginLogout callback completes, you can perform the following tasks:
|Tip Do not load a sequence file or run an execution in response to command-line arguments until you give the user a chance to log in.|