I am really new to Notes API and I am trying to use the NSFDBGetOptions call to retrieve the DBOPTION_NO_BGAGENT value. Here’s what I have written so far:
Declarations
Const APIModule = “NNOTES” ’ Windows
Declare Function OSPathNetConstruct Lib APIModule Alias “OSPathNetConstruct” _
( Byval NullPort As Long, Byval Server As String, Byval FIle As String, Byval PathNet As String) As Integer
Declare Function NSFDbOpen Lib APIModule Alias “NSFDbOpen” _
( Byval PathName As String, DbHandle As Long) As Integer
Declare Function NSFDbClose Lib APIModule Alias “NSFDbClose” _
( Byval DbHandle As Long) As Integer
Declare Function NSFDbGetOptions Lib APIModule Alias “NSFDbGetOptions” _
( Byval DbHandle As Long, Options As Long) As Integer
Declare Function NSFDbSetOptions Lib APIModule Alias “NSFDbSetOptions” _
( Byval DbHandle As Long, DOpt As Integer, DbMask As Integer ) As Integer
Const DBOPTION_NO_BGAGENT = &H00000200
Initialize
Sub Initialize
Dim session As New NotesSession
Dim currentdb As NotesDatabase
Dim dbserver As String
Dim hDB As Long
Dim status As Long
Set currentdb = session.CurrentDatabase
dbserver = currentdb.Server
Set newdb = New NotesDatabase( dbserver, "test.nsf" )
p$ = String(1024, " ")
OSPathNetConstruct 0, dbserver, newdb.FilePath, p$
NSFDbOpen p$, hDB
If hDB = 0 Then
Exit Sub
Else
status = NSFDbGetOptions( hDB, DBOPTION_NO_BGAGENT )
NSFDbClose hDB
End If
End Sub
However, it doesn’t seem to return the value for me. For those of you who are very proficient in Notes API, I would really appreciate your assistance in helping me to identify what I am doing wrong. Thank you in advance.