HIWORD

InstallShield 2014 ยป InstallScript Language Reference

The HIWORD function extracts and returns the high-order word (upper two bytes) from the 32-bit integer value specified by lValue.

InstallShield's HIWORD differs from the corresponding C macro in that it uses sign extension. As a result, the high-order bytes of the value returned by HIWORD are filled with ones if lValue is negative. If necessary, you can use the bitwise AND operator (&) to combine the result with 0xFFFF to produce a positive value, as shown below:

    lValue = HIWORD(lValue);

    lValue = lValue & 0xFFFF;

Syntax

HIWORD ( lValue );

Parameters

HIWORD Parameters

Parameter

Description

lValue

Specifies the 32-bit integer from which to extract the upper two bytes.

Return Values

HIWORD returns the high-order word (upper two bytes) of lValue.

See Also