HiWord




Private Declare Sub CopyMemory Lib "kernel32" _
Alias "RtlMoveMemory" (dest As Any, _
source As Any, ByVal bytes As Long)

' Return the high word of a Long value.


Function HiWord(ByVal value As Long) As Integer
CopyMemory HiWord, ByVal VarPtr(value) + 2, 2
End Function










( hiword.html )- by Paolo Puglisi - Modifica del 17/12/2023