![]() |
![]() |
![]() |
HiWords and LoWords from Long Values |
|||
|
Steve McMahon(steve@vbaccelerator.com) |
![]() |
||
|
![]() |
|||
|
21/02/99 |
![]() |
||
Other Tips |
When translating C code to VB, you quite often come across the HiWord and LoWord
operators, used to pack two integers into a long value. A simple translation
of HiWord code will run into difficulties when unsigned integer arithmetic is being
used in the C code and the highest bit of the long value can be set. Since VB
doesn't support unsigned arithmetic we have to strip out the high bit and add
it back again later to avoid overflows and misleading results.
Public Property Get LoWord(ByRef lThis As Long) As Long |
|||
  |
Related Tips and Articles: |
|
![]() |
  |
![]() |
|
About Contribute Send Feedback Privacy
|