How can i check the REPLFLG_NO_CHRONOS flag with the C API? (solved)

Hello

I’ve already made some code to set the database option “disable background agents for this database”. And it works fine… look here:

= = = = = = = = = = = = = =

Declarations:

Const APIModule = “NNOTES” ’ Windows/32 only

Const REPLFLG_NO_CHRONOS = &H0800

Public ThisDB As NotesDatabase

Public session As NotesSession

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


Initialize:

On Error Goto Errorhandling

Dim TargetDB As NotesDatabase

Dim hDB As Long

Dim R As ReplicaInfo

Set SESSION = New NotesSession

Set ThisDB = SESSION.CurrentDatabase

Dim TargetDBdir As New NotesDbDirectory(ThisDB.Server)

Set TargetDB = TargetDBdir.GetFirstDatabase(1247) 'Any Notes database (NSF, NSG, or NSH file)

While Not(TargetDB Is Nothing)

If Instr(Lcase(TargetDB.FilePath) , "archive") > 0 Then

Print Now, TargetDB.Title, TargetDB.FileName

p$ = String(1024, " ")

OSPathNetConstruct 0, TargetDB.Server, TargetDB.FilePath, p$

NSFDbOpen p$, hDB

NSFDbReplicaInfoGet hDB, R

R.Flags = R.Flags Or REPLFLG_NO_CHRONOS

NSFDbReplicaInfoSet hDB, R

NSFDbClose hDB

End If

Set TargetDB = TargetDBdir.GetNextDatabase

Wend ’ Not(TargetDB Is Nothing)

Exit Sub

SingleExit:

Exit Sub

Errorhandling:

Print Now , Str$(Err) , Error$ , Str$(Erl)

Exit Sub

= = = = = = = = = = = = = =

But how can i check if this property has already been set?

I’m searching a solution for something like this:

if REPLFLG_NO_CHRONOS = 1 then < how can i achieve this?

print “inactive”

R.Flags = R.Flags Or REPLFLG_NO_CHRONOS

else

print “active”

end if

Thank you in advance


I found a solution! Problem solved. Thx