Topic Path: Symbol Reference > Classes > TIdAttachmentMemory Class > TIdAttachmentMemory Methods > Create Constructor > Create Constructor (TIdMessageParts, TIdStream)
ContentsIndexHome
PreviousUpNext
TIdAttachmentMemory.Create Constructor (TIdMessageParts, TIdStream)

Constructor for the object instance.

constructor Create(
    Collection: TIdMessageParts; 
    const CopyFrom: TIdStream
); overload; reintroduce;
Parameters 
Description 
Collection 
Owner of the message part.
 
CopyFrom 
Stream with the content for the message part. 

Create is an overloaded reintroduced constructor for the object instance. 

Create calls the inherited constructor using Collection as the owner for the memory-based message attachment. 

CopyFrom is the TIdStream instance with the content for the memory-based message attachment. Values in CopyFrom are read into the TIdMemoryStream instance allocated to the DataStream property. Values in CopyFrom stream are read into the DataStream property until the entire contents of the CopyFrom stream has been loaded in the DataStream property. 

Use an overloaded variant of the constructor to load the contents of the memory-based attachment from a String value.

Create 

TIdStream 

DataSteam 

TIdMemoryStream

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.