IVHooks interface : UserLoggedIn method

UserLoggedIn method
Event
A user logged in to VWorks software.
Description
VWorks software calls the UserLoggedIn method after a user logs in to VWorks software.
Syntax
 
HRESULT UserLoggedIn(
[in] BSTR sXML,
[in, out] BSTR* sResultXML
);
Parameters
 
[in] A LoginComplete XML element that contains the name and security level of the user who logged in to VWorks software.
UserLoggedIn method input
VWorks software passes a LoginComplete XML element into the sXML parameter of the UserLoggedIn method. This XML element provides the name and security level of the user who logged in to VWorks software.
LoginComplete element
The LoginComplete element has the following attributes:
 
0 = Administrator
1 = Technician
2 = Operator
3 = Guest
Example of LoginComplete method input
The following sample code is a LoginComplete XML element that is received by the plugin from VWorks software as a string in the sXML parameter of the UserLoggedIn method. VWorks software tells the plugin that the user named LSinclair logged in to VWorks software as Administrator.
 
<LoginComplete AccessLevel='0' UserName='LSinclair' />
UserLoggedIn method output
The plugin returns a HookResults XML block in the sResultXML parameter of the UserLoggedIn method. For information about the structure and contents of this XML block, see “HookResults XML block” .
Example of UserLoggedIn method output
The following sample code is a HookResults XML block that is returned to VWorks software by the plugin as a string in the sResultXML parameter of the UserLoggedIn method. The plugin tells VWorks software to write the following Info-type message to the Main Log:
LSinclair logged in as Administrator.
 
<HookResults>
<Results>
<HookResult ResultType='Log Message'
ResultValue='LSinclair logged in as Administrator.' />
</Results>
</HookResults>
Related information