LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Show details for Online resourcesOnline resources
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: NSFDbGetModifiedNoteTable using a TIMEDATE

NSFDbGetModifiedNoteTable using a TIMEDATE (by Adam Bridger, 02/17/2010 03:28:47 PM)

Has anyone got an example of using NSFDbGetModifiedNoteTable using a TIMEDATE, ie. not just getting all notes, but those modified since a specified time?

What I really want to do is run this regularly, saving the enddate for later use. For the life of me I can't get it working. Below is a snippet of what I've tried.

...

Type TIMEDATE

   Innards(1) As Long

End Type

Const wAPIModule = "NNOTES" ' Windows/32

Declare Private Function winNSFDbGetModifiedNoteTable Lib wAPIModule Alias "NSFDbGetModifiedNoteTable" (Byval hDb As Long, Byval noteClassMask As Integer, Byval startDate1 As Long, Byval startDate2 As Long, retEndDate As TIMEDATE, rethTable As Long) As Integer

...

Dim apiTime As TIMEDATE

'This is the return value of an enddate returned by

'NSFDbGetModifiedNoteTable on a previous run (=14/02/2010 18:01:22)

'I have modified a doc since that time.

apiTime.Innards(0) = Val("&H006300DF&")

apiTime.Innards(1) = Val("&H802576CA&")

s$ = Space(80)

winConvertTIMEDATEToText 0, 0, apiTime, s$, 80, ns%

AddedToFile = Left$(s$, ns%)

Print "StartTime:" & AddedToFile 'Prints 14/02/2010 18:01:22

On Error Goto errSub

Call winNSFDbGetModifiedNoteTable( dbhandle, NOTE_CLASS_DOCUMENT, apiTime.Innards(0), apiTime.Innards(1), enddate , idtablehandle )

If winIDEntries( idtablehandle) <>0 Then

   If winIDScan( idtablehandle, True, noteid ) Then

      Do While winIDScan( idtablehandle, False, noteid )

         Print "found",Hex$(noteId)

         noteIDs = noteIDs & "," & Hex$( noteId)

      Loop

   End If

End If