'Declaration
Const APIModule = "NNOTES" ' Windows/32 only
Const REPLFLG_DO_NOT_CATALOG = &H0040
Type ReplicaInfo
ID(1) As Long
Flags As Integer
CutoffDays As Integer
CutoffDate(1) As Long
End Type
Declare Function NSFDbOpen Lib APIModule Alias "NSFDbOpen" _
( Byval P As String, H As Long) As Integer
Declare Function NSFDbClose Lib APIModule Alias "NSFDbClose" _
( Byval H As Long) As Integer
Declare Function OSPathNetConstruct Lib APIModule Alias "OSPathNetConstruct" _
( Byval Z As Long, Byval S As String, Byval F As String, Byval P As String) As Integer
Declare Function NSFDbReplicaInfoGet Lib APIModule Alias "NSFDbReplicaInfoGet" _
( Byval H As Long, R As ReplicaInfo) As Integer
Declare Function NSFDbReplicaInfoSet Lib APIModule Alias "NSFDbReplicaInfoSet" _
( Byval H As Long, R As ReplicaInfo) As Integer
Sub ListInCatalog(db As NotesDatabase, listdb As Variant)
Dim hDB As Long
p$ = String(1024, " ")
OSPathNetConstruct 0, db.Server, db.FilePath, p$
NSFDbOpen p$, hDB
Dim R As ReplicaInfo
NSFDbReplicaInfoGet hDB, R
If listdb = True Then
R.Flags = R.Flags And Not REPLFLG_DO_NOT_CATALOG
Else
R.Flags = R.Flags Or REPLFLG_DO_NOT_CATALOG
End If
NSFDbReplicaInfoSet hDB, R
NSFDbClose hDB
End Sub