LotusScript to C API Programming Guide

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




Hosted by Prominic.NET, Inc.
Main topic: Can we have an alternative to EnumCompositeBuffer in LotusScript?

Can we have an alternative to EnumCompositeBuffer in LotusScript? (by Johnny Jiang, 10/26/2007 10:24:25 PM)

Hi Normunds,

This is my 2nd question sent to you for help, as I couldn't find out an existing solution at ls2capi.com and even google.

I wonder if there is a way we can simulate EnumCompositeBuffer in Lotus C API in LotusScript to traverse richtext items?

I got the following statement from Lotus C API reference:

...Since each CD record may have a different header and a different length, parsing a CD buffer is fairly complex....

I viewed your ready-to-use samples, it seems that if we know how CD-Records align in a richtext item, it's simpler for us to read them through. But if we are facing a completely strange richtext item and have no idea how it's CD-Records align, we must use some special methods such as EnumCompositeBuffer. I hesitate to try LotusScript version of EnumCompositeBuffer as I saw your comments:

• Function uses callback(s) or is used by a callback; from LotusScript may be used in a limited way or may not be usable all.

• The use is either non-verified or requires special considerations; see comments if available!

Even with the regular ODSReadMemory, I'm even expreriencing diffculty using it.

I was trying to retrieve the $ACTIONS item from Notes forms, and iType is returned as 0 or 1, I doubt if it is correct.

'Get the actionbar field in the note

ret = CNSFItemInfo(m_hMemory, _



biItemBlockID, _

longValueDataType, _

biValueBlockID, _

longValueLen _


If (ret <> C_NOERROR) Then

Error ret, Me.GetErrorMessage(ret)

End If

'Lock the block and get the memory pointer

longPtrMem = COSLockObject(biValueBlockID.pool) + biValueBlockID.block

'Get type, skip it as I don't know what iType means ***

Call CODSReadMemory(longPtrMem, ODS_WORD, iType, 1)

'Read the actionbar information from the memory pointer

Dim structCDActionBar As CDACTIONBAR

Call CODSReadMemory(longPtrMem, _


structCDActionBar, _


Thanks for your time and appreciate your help.

Kind Regards,

Best regards,