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: Problem with NSFItemInfoNext and Large Rich Text Fields

Problem with NSFItemInfoNext and Large Rich Text Fields (by Chris Jones, 05/27/2004 04:27:53 AM)

As previously mentioned in this forum, I have been developing LotusScript code which calls into the Notes C API in order to determine the structure of a rich text item in memory.

I am using note.Handle and a call to NSFItemInfo to retrieve the first rich text item named "Body", and calls to NSFItemInfoNext to get subsequent items with the same name - this is required if the content of the body field is large enough to get split across multiple items.

As described in Normunds' book, I am using OSLockObject & ODSReadMemory to scan each of these items and read the basic structure - primarily just BSIG / WSIG / LSIG headers with the relevant signatures.

This works fine in almost all cases - both where the field is split into multiple items, and where there is only one item.

However, I recently identified a bug that occurs in a handful of cases, where the first item (returned by NSFItemInfo) is fine, but when I try and read the value of the next item (returned by NSFItemInfoNext) I seem to get total gibberish.

As far as I have been able to identify, this seems to occur where there are multiple items and where the split occurs at the beginning of a text paragraph (SIG_CD_TEXT).

Having looked at the document structure with NotesPeek, I can see that the field size and type returned are correct, but when I try and access the data at the 'value' block id, I don't get anything recognisable. NotesPeek sees all of the data perfectly, so I am guessing it must be something I am doing wrong..?

Has anyone seen anything like this before?