Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 781
  • Last Modified:

How do i Append a Item ("Body") to Notes Document ?

Hi All
i am facing a problem when trying to append a Body item into Note..
I have whole Body Data(Tables, Para, Sections etc) into a Buffer and trying to call the NSFItemAppend methd But when i try to update the Note ,it gives the error,
"Document has Invalid Structure"..
Where am i wrong?

The Code and Buffer data is Attached

Thanks

//*****SOME STEPS ARE HERE*******************
BYTE      *rt_field;  /* allocated rich-text field */
	DWORD rt_size;
 
	//--------------SOME STEPS ARE HERE---------------------------
 
        error = NSFItemAppend( hMemo,ITEM_SIGN | ITEM_SEAL,
			    "Body", strlen("Body"),TYPE_COMPOSITE,
				(BYTE *)rt_field; rt_size);
 
		char errorBuf[LNERROR_MESSAGE_LENGTH];
				LNGetErrorMessage(error, errorBuf);
			
				error = NSFNoteUpdate(hMemo, 0);
				
				LNGetErrorMessage(error, errorBuf);
				free( rt_field );

Open in new window

untitled.bmp
0
davinder101
Asked:
davinder101
1 Solution
 
trinitrotolueneCommented:
The layout of the buffer should exactly match what  NSFItemAppend is expecting. Check this out first especially the data types....

You may want to check

http://www-12.lotus.com/ldd/doc/tools/c/4.6.2/Api462re.nsf/a559a53ff788a683852561bf00736791/404f657fffc0719a85255fc800648521?OpenDocument
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now