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

Converts binary values from host byte order to network byte order for the data type.

procedure CopyTIdNetworkCardinal(
    const ASource: Cardinal; 
    var VDest: TIdBytes; 
    const ADestIndex: Integer
Data type to convert.
Destination where converted byte values are stored.
Position in the destination where converted byte values are stored. 

CopyTIdNetworkCardinal is a procedure used to convert a binary value in ASource representing a Cardinal data type from its representation in host-specific byte order to the network byte order. 

VDest is the array of bytes where the data type is stored after converting the byte order for the Cardinal value. 

VDestIndexs is the initial position in VDest where the converted byte values wil be stored. 

CopyTIdNetworkCardinal uses the HostToNetowrk method in the TIdStack descendant for the platform hosting the Indy library to perform byte order conversion. 

CopyTIdNetworkCardinal is used in the implementation of protocol clients like TIdSNTP and TIdFSP where the byte ordering in integer values differ in the usage and transmission formats of the data type. 

CopyTIdNetworkCardinal is not declared in the IdGlobal.pas unit because unit references needed for TIdStack and other descendants are not already included in that unit.

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