Function : File Attachment

NSFNoteAttachFile - Attaches a disk file to a note.
----------------------------------------------------------------------------------------------------------

#include <nsfnote.h>

STATUS LNPUBLIC NSFNoteAttachFile(
NOTEHANDLE note_handle,
const char far *item_name,
WORD item_name_length,
const char far *file_name,
const char far *orig_path_name,
WORD encoding_type);

Description :

Attaches a disk file to a note. To accomplish this, the function creates an item of TYPE_OBJECT, sub-category OBJECT_FILE, whose ITEM_xxx flag(s) are set to ITEM_SIGN | ITEM_SEAL. The item that is built by NSFNoteAttachFile contains all relevant file information and the compressed file itself. Since the Item APIs offer no means of dealing with signed, sealed, or compressed item values, the File Attachment API NSFNoteDetachFile must be used exclusively to access these items.

Parameters :

Sample Usage :

error = NSFNoteAttachFile (hMessage,
   ITEM_NAME_ATTACHMENT,  
   strlen(ITEM_NAME_ATTACHMENT),
   filename, pathname, COMPRESS_HUFF);


See Sample Program :

See Also :

COMPRESS_xxx
----------------------------------------------------------------------------------------------------------