Topic Path: Symbol Reference > Classes > TIdBuffer Class > TIdBuffer Methods > ExtractToInt64 Method
ContentsIndexHome
PreviousUpNext
TIdBuffer.ExtractToInt64 Method

Reads and optionally removes a Cardinal value from the internal storage for the buffer.

function ExtractToInt64(
    const AIndex: Integer
): Int64;
Parameters 
Description 
AIndex 
Postion in the buffer where bytes for the data type are stored. 

Int64 - Value read from the internal storage for the buffer.

ExtractToInt64 is an Int64 function used to read and optionally remove an Int64 value from the internal storage for the buffer. 

AIndex is the zero-based offset of the byte value to extract from the internal storage for the buffer. AIndex normally contains a value in the range 0 (zero) to Size-1. When AIndex contains 0 or a positive value, the content in the buffer is not altered by the Extract operation. 

Using a negative value in AIndex indicates that data is being accessed sequentially and calls Remove to adjust the current buffer position and the space allocated for the buffer by the size for the ordinal data type. 

ExtractToInt64 calls the BytesToInt64 routine to convert the byte values in the buffer to the ordinal data type. The converted data type is adjusted from network byte order to host-specific byte order using the NetworkToHost method in GStack for the operating system or platform. 

Use one of the other Extract methods to read a specific data type from the internal storage for the buffer: 

 

Method 
Storage Data Type 
String 
Byte 
Cardinal 
ExtractToInt64 
Int64 
Word 

 

Use IndexOf to find the position in the buffer where a specific sequence of byte values is located.

Exceptions 
Description 
Raised with RSNotEnoughDataInBuffer and the requested byte count. 
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.