Topic Path: Symbol Reference > Functions > WriteMemoryStreamToStream Function
WriteMemoryStreamToStream Function

Writes the contents of a memory stream to a TStream descendant.

procedure WriteMemoryStreamToStream(
    Src: TIdMemoryStream; 
    Dest: TIdStream; 
    Count: int64
Memory stream containing values to be written to the destination.
Stream desendant to receive values.
Number of bytes from the source to be written to the destination. 

WriteMemoryStreamToStream is a procedure used to write the contents of the TMemoryStream identifies in ASrc to the TStream descendant identified in ADest. Count identifies the number of bytes from ASrc to be written to the stream identified in ADest. 

WriteMemoryStreamToStream accesses the memory pool allocated to the memory stream, and calls the Write method for the TStream descendant in ADest to transfer the number of bytes indicated in Count. 

WriteMemoryStreamToStream isolates the differences between stream implementations on differing platforms. 

Use one of the following common stream routines to read or write the associated ordinal data type using a stream instance: 


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