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: Problems with memory management and NSFItemAppend

Problems solved !!! (by Kenneth Haggman, 11/24/2004 06:04:09 PM)

This "beast" wasn't an easy one. To get NSFItemAppend to work as I wanted, I had to do 3 things.

1. Change the declaration of the API as this:

Declare Function W32_NSFItemAppendStr Lib "nnotes" Alias "NSFItemAppend" (Byval hNote As Long, Byval flags As Integer, Byval ItemName As String, Byval ItemNameLength As Integer, Byval itemType As Integer, Byval Buff As String, Byval BuffLength As Long) As Integer

Notice that the 2nd last parameter is defined as string.

2. Use ITEM_SIGN (&h0001) as 2nd parameter - the flags.

3. Before even attempting the first call on NSFItemAppend, delete the existing $ScriptLib item(s).

I still have some problems, but they are related to strange data sometimes coming in from the reading of the items, or it may be the translation. Hopefully I can sort them out.

Anyway, thanks for your help.

// Kenneth