Public Function MakeDWord05(ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
' by G.Beckmann, G.Beckmann@NikoCity.de, 20001207
MakeDWord05 = (HiWord * &H10000) Or (LoWord And &HFFFF&)
End Function
MakeDWord06 Public Function MakeDWord06(ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
' by Karl E. Peterson, http://www.mvps.org/vb, 20001207
' High word is coerced to Long to allow it to
' overflow limits of multiplication which shifts
' it left.
MakeDWord06 = (CLng(HiWord) * &H10000) Or (LoWord And &HFFFF&)
End Function
谁来猜猜,谁快?
HiWord = (DWord And &HFFFF0000) \ &H10000 堪称最完美,但如果integer去高BYTE,这个用不上了,必须参考
zGetLngHigh = (zLong And &H7FFF0000) \ &H10000 Or (((zLong And &H80000000) <> 0) And &H8000)