IntSwap

Reverses the 2 bytes of a short integer or short unsigned

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

Syntax

  #include <nwstring.h>  
   
  WORD IntSwap  (  
     WORD   unswappedInteger);
  

Parameters

unswappedInteger
(IN) Specifies an integer for which high and low bytes are reversed.

Return Values

Returns the byte-swapped integer.

Remarks

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

See Also

LongSwap