by Mustafa Karakaş (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 26th September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This function makes two 2 byte integer data a long 4 byte data, which loword is first 2 byte and hiword is second 2 byte data.
Dim a As Long
Dim b As Long
a = CLng(high)
b = CLng((2 ^ 16))
a = CLng(a * b)
a = a Or low
MakeLong = CLng(a)
End Function
'You can get a long number hiword and loword with this code
' x1 and y1 are integer
' lParam is long
x1 = lParam And 65535
y1 = lParam / (2 ^ 16)
No comments have been posted about This function makes two 2 byte integer data a long 4 byte data, which loword is first 2 byte and hi. Why not be the first to post a comment about This function makes two 2 byte integer data a long 4 byte data, which loword is first 2 byte and hi.