SetUserSessionId
Set the Session Index of user.
Public Function SetUserSessionId(ByVal CabinetName As String,
ByVal lUserSessionId As Long,
ByVal password As String) As Long
Parameters
In/out |
Name |
Data type |
Description |
In |
CabinetName |
String |
Name of the cabinet user to trying to login |
In |
LuserSessionId |
Long |
User’s login session Id |
In |
Password |
String |
Password entered by the user |
Description
This function is used to set the session index of the user to reuse the pandb connection. It is called by OmniAcquire.
Return value
Name |
Description |
NG_SUCCESS |
In case of success |
-4 |
Invalid operation for local cabinet |
-1 |
ERR_INVALID_INI_ENTRY |
Example
Dim lRetVal As long
Dim CabinetName As String
Dim lUserSessionId As long
Dim password As string
CabinetName = “Omnidocs”
lUserSessionId = 193
Password = “Supervisor”
IRetVal = SetUserSessionId(CabinetName, lUserSessionId, password)
If lRetVal = NG_SUCCESS Then
Msgbox “Success”
Else
Msgbox "Invalid SessionId. User may not exists or is disconnected."
End If