Internet Direct (Indy)
Home
PreviousUpNext
ToBytes Function

Converts the data type to a TIdBytes value.

Pascal
function ToBytes(
    const AValue: TIdBytes; 
    const ASize: Integer
): TIdBytes; overload;
Parameters 
Description 
AValue 
Bytes values to be converted.
 
ASize 
Number of bytes to include in the converted data type. 

TIdBytes - Results of the data type conversion.

ToBytes is an overloaded TIdBytes function used to convert the TIdBytes value in AValue up to and including the number of byte values specified in ASize. 

Since AValue is already a TIdBytes data type, no real conversion is required. The return value for the function is resized to the value in ASize, and CopyTIdBytes is called to copy the number of bytes in ASize from AValue into the return value for the function.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.