Topic Path: Symbol Reference > Classes > TIdAttachment Class > TIdAttachment Methods > CloseLoadStream Method
ContentsIndexHome
PreviousUpNext
TIdAttachment.CloseLoadStream Method

Specifies the method used to close the internal stream needed for loading an attachment before transmission.

procedure CloseLoadStream; virtual; abstract;

CloseLoadStream is an abstract virtual procedure that specifies the method used to close the internal stream needed for loading an attachment. 

CloseLoadStream is used to ensure that the internal stream for accessing data in the message part is reset when all values have been read during transmission. If the internal stream is created in OpenLoadStream, it should be freed in CloseLoadStream. An existing stream must be repositioned to its initial position prior to reading values for the message part. 

CloseLoadStream must be overriden in an ancestor class to properly close (or free) the internal stream used for loading the contents of an attachment prior to transmission. 

Use OpenLoadStream to initialize the stream used for loading the contents of a message attachment.

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