Initializes the message field values of an a_palm_msg instance.
Err PalmLsnDupMessage( struct a_palm_msg * const msg, Char const * message )
msg A pointer to an a_palm_msg instance.
message An input parameter containing the source message text.
A Palm OS error code. errNone indicates success.
The PalmLsnDupMessage function duplicates a text message, extracts the subject, content, and sender fields, and assigns these values to an a_palm_msg instance.
The sender field is not extracted if it does not appear in the message. If you use PalmLsnDupSender it overrides the sender field extracted from PalmLsnDupMessage (if any).
The following example, used for the Treo 650 smartphone implementation, retrieves a text message and calls PalmLsnDupMessage to initialize the appropriate fields in an a_palm_msg instance.
// // Retrieve the entire message body // ret = PhnLibGetText( libRef, id, &msgBodyH ); if( ret != errNone ) { // handle error goto done; } msgBody = (Char *)MemHandleLock( msgBodyH ); ret = PalmLsnDupMessage( ulMsg, msgBody ); // // msgBodyH must be disposed of by the caller // MemHandleUnlock( msgBodyH ); MemHandleFree( msgBodyH ); if( ret != errNone ) { // handle error goto done; } |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |