LongSwap

Reverses all 4 bytes of a long integer or long unsigned

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:3.x, 4.x, 5.x, 6.x
Platform:NLM
Service:Data Manipulation

Syntax

  #include <nwstring.h>  
   
  long LongSwap  (  
     long   unswappedLong);
  

Parameters

unswappedLong
(IN) Specifies the long integer for which all 4 bytes are to be reversed.

Return Values

Returns the reversed long integer.

Remarks

An application can call LongSwap to reverse the high-low order of a long integer being sent or received. The 80x86 family of processors store long integers in low-high order. Since some of the network functions require long integers to be in high-low order, long integers must be converted before they are sent or after they are received.

See Also

IntSwap