ULong2Long - Reinterpret an unsigned 32 bit integer as signed |
Top Previous Next |
Syntax
<nLong> := ULong2Long( <nULong> )
Parameters
<nULong>
ULONG value to be converted to LONG value. Values outside the allowed range will result in unpredictable return values.
Return value
The LONG value that results if the bits in <nULong> are interpreted as signed.
Description
ULong2Long converts an unsigned 32 bit value into a signed 32 bit value. In C a 32bit value can be interpreted in different ways. This interpretation is defined by the type. For example the binary value 11111111 11111111 11111111 11111111 could be interpreted as +4294967295 (ULONG) or as -1 (LONG).
So what this function actually does is reinterpret the bit pattern of the ULONG <nULong> as a LONG.
Classification
Core
Category
Quick Info
Library: cckptcor.lib / cckptcor.dll
See also
Example
|