Solved

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

Posted on 2009-07-14
1
763 Views
Last Modified: 2013-12-18
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
Comment
Question by:davinder101
1 Comment
 
LVL 12

Accepted Solution

by:
trinitrotoluene earned 500 total points
ID: 24852213
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus Notes 41 185
Retrieve PID of MicrosoftEdge.exe with GetForegroundWindow() 6 123
Writing a parser for java language 4 71
C++ standard library based binary archive format 6 91
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now