CreateReplicaIDItem
[syntax="ls"]Const wAPIModule = "NNOTES" ' Windows/32
Declare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
( Byval P As String, hDB As Long) As Integer
Declare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
( Byval hDB As Long) As Integer
Declare Private Function NSFNoteOpen Lib wAPIModule Alias "NSFNoteOpen" _
( Byval hDB As Long, Byval NoteID As Long, Byval F As Integer, hNT As Long) As Integer
Declare Private Function NSFNoteClose Lib wAPIModule Alias "NSFNoteClose" _
( Byval hNT As Long) As Integer
Declare Private Function NSFNoteUpdate Lib wAPIModule Alias "NSFNoteUpdate" _
( Byval hNT As Long, Byval F As Integer) As Integer
Declare Private Function NSFItemSetTime Lib wAPIModule Alias "NSFItemSetTime" _
( Byval hNT As Long, Byval N As String, T As Long) As Integer
Declare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
( Byval zP As Long, Byval S As String, Byval F As String, Byval N As String) As Integer
Sub CreateReplicaIDItem(doc As NotesDocument, itemname As String, rid As String)
db$ = Space(1024)
With doc.ParentDatabase
OSPathNetConstruct 0, .Server, .FilePath, db$
End With
Dim T(1) As Long ' TIMEDATE
T(0) = Clng("&H" & Mid$(rid, 9))
T(1) = Clng("&H" & Left$(rid,
)
Dim hDB As Long
NSFDbOpen db$, hDB
If hDB = 0 Then Exit Sub
Dim hNT As Long
NSFNoteOpen hDB, Clng("&H" & doc.NoteID), 0, hNT
If Not hNT = 0 Then
NSFItemSetTime hNT, itemname & Chr$(0), T(0)
NSFNoteUpdate hNT, 0
NSFNoteClose hNT
End If
NSFDbClose hDB
End Sub[/syntax]
Declare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
( Byval P As String, hDB As Long) As Integer
Declare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
( Byval hDB As Long) As Integer
Declare Private Function NSFNoteOpen Lib wAPIModule Alias "NSFNoteOpen" _
( Byval hDB As Long, Byval NoteID As Long, Byval F As Integer, hNT As Long) As Integer
Declare Private Function NSFNoteClose Lib wAPIModule Alias "NSFNoteClose" _
( Byval hNT As Long) As Integer
Declare Private Function NSFNoteUpdate Lib wAPIModule Alias "NSFNoteUpdate" _
( Byval hNT As Long, Byval F As Integer) As Integer
Declare Private Function NSFItemSetTime Lib wAPIModule Alias "NSFItemSetTime" _
( Byval hNT As Long, Byval N As String, T As Long) As Integer
Declare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
( Byval zP As Long, Byval S As String, Byval F As String, Byval N As String) As Integer
Sub CreateReplicaIDItem(doc As NotesDocument, itemname As String, rid As String)
db$ = Space(1024)
With doc.ParentDatabase
OSPathNetConstruct 0, .Server, .FilePath, db$
End With
Dim T(1) As Long ' TIMEDATE
T(0) = Clng("&H" & Mid$(rid, 9))
T(1) = Clng("&H" & Left$(rid,
Dim hDB As Long
NSFDbOpen db$, hDB
If hDB = 0 Then Exit Sub
Dim hNT As Long
NSFNoteOpen hDB, Clng("&H" & doc.NoteID), 0, hNT
If Not hNT = 0 Then
NSFItemSetTime hNT, itemname & Chr$(0), T(0)
NSFNoteUpdate hNT, 0
NSFNoteClose hNT
End If
NSFDbClose hDB
End Sub[/syntax]