SetAlarms
Sets the alarm specified by the user
SetAlarms(btAlarms() As Byte,
lSetAlarmCount As Long) As Long
Parameters
In/out |
Name |
Data type |
Description |
In,Out |
BtAlarm |
Byte[TagAlarm] |
[In]Byte array containing information regarding the alarm(s) to be set [Out] Byte array containing information regarding the alarm(s) set |
Out |
LsetAlarmCount |
Long |
Number of alarms set |
Description
This function is called only in shared cabinet when user tries to set alarm. Information
Regarding the alarms set is returned in the parameter btAlarm.Parameter lsetAlarmCount
Is passed as 0 while making the call, and is returned with the count of number of alarms Set.
Return value
Name |
Description |
NG_SUCCESS |
In case of success |
-1 |
Invalid cabinet name |
-2 |
Local cabinet is read only |
-3 |
Cabinet not connected |
-4 |
Invalid Operation |
-201 |
Insufficient rights for the current operation |
Example
Dim infoAlarm As TagAlarm
Dim btAlarm() As byte
Dim lRetVal As Long
infoAlarm.ActionType = 2 ‘for document deletion
infoAlarm.ObjectId = 13
infoAlarm.ObjectName = “valley.tif”
infoAlarm.Alarmtype = “U”
infoAlarm.InformMode = “B”
infoAlarm.UserIndex = 7
ReDim btAlarm(Len(infoAlarm) - 1)
Call CopyMemory(btAlarm(0), infoAlarm, Len(infoAlarm))
lRetVal = gPDb(miCurCabId).SetAlarms(btAlarm, lSetAlarmCount)
If lRetVal <> NG_SUCCESS Then
MsgBox gPDb(miCurCabId).ErrDescription, vbInformation
Screen.MousePointer = vbNormal
Exit Sub
End If