AddAssociatedFileFromStream
Associated files, attachments, streams
Description
Creates one embedded-file stream from Source and registers its file specification in both the embedded-file name tree and catalog associated-file array
Syntax
Function AddAssociatedFileFromStream(Source: TStream; Const DisplayName, MIMEType, Description, Relationship: WideString): Integer;Parameters
| Source | Non-empty stream read completely from offset zero; the original position is restored and the size must not exceed MaxInt |
|---|---|
| DisplayName | Name shown for the embedded file; must not be empty and must not duplicate an existing embedded-file title |
| MIMEType | MIME type stored in the file specification; must not be empty |
| Description | Optional description stored in the associated-file entry; may be empty |
| Relationship | Relationship role, one of Source, Data, Alternative, Supplement or Unspecified |
Return values
Returns a nonzero embedded-file handle on success or 0 on failure
Remarks
The complete stream is read from offset zero, the original position is restored, and the embedded parameters include size, checksum, and timestamps
The stream must be nonempty and no larger than MaxInt