VBspeed / Bits / LoWord
VBspeed © 2000-10, updated: 06-Dec-2000
LoWord


Function LoWord
Returns the LoWord (the least significant 2 bytes) from a 4-byte DoubleWord (aka Long).
Code
LoWord01
Public Function LoWord01(lDWord As Long) As Integer
  If lDWord And &H8000& Then
    LoWord01 = lDWord Or &HFFFF0000
  Else
    LoWord01 = lDWord And &HFFFF&
  End If
End Function
  
LoWord02
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
    (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

Public Function LoWord02(lDWord As Long) As Integer CopyMemory LoWord02, lDWord, 2& End Function
Calls
1iRet = LoWord(&HFFFFFFFF)
2iRet = LoWord(&H80000000)
Charts
 VB5 Charts
Code
LoWord01 
LoWord02 
Call 1
11.000.026Ás
211.880.308Ás
Call 2
11.000.026Ás
211.850.308Ás
 VB6 Charts
Code
LoWord01 
LoWord02 
Call 1
11.000.026Ás
212.000.311Ás
Call 2
11.000.026Ás
212.000.311Ás
Conclusions
Look at the numbers and draw your own conclusions...
Got comments? How to read all those numbers

top




VBspeed © 2000-10 by Donald Lessau