vbAccelerator - Contents of code file: Test_Helpers.bas
Attribute VB_Name = "Helpers"
Option Explicit
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As
Any, pSource As Any, ByVal dwLength As Long)
' Returns the low-order word from the given 32-bit value.
Public Function LOWORD(ByVal dwValue As Long) As Long
CopyMemory LOWORD, dwValue, 2
End Function
' Returns the high-order word from the given 32-bit value.
Public Function HIWORD(ByVal dwValue As Long) As Long
CopyMemory HIWORD, ByVal VarPtr(dwValue) + 2, 2
End Function
|
|