我有一个低级鼠标钩:
Public Structure MSLLHOOKSTRUCT
Public pt As Point
Public mouseData As Int32
Public flags As Int32
Public time As Int32
Public dwExtraInfo As IntPtr
End Structure
我想从“mouseData”中得到高句话:
Dim iWheelDelta As Integer = HIWORD(myhookstruct.mouseData)
到目前为止,我在VB6中做到了这一点,并且我使用了
Public Function HIWORD(LongIn As Long) As Integer
CopyMemory HIWORD, ByVal VarPtr(LongIn) + 2, 2
End Function
但是,我想并希望VB.NET中有安全的方法。
有人可以帮忙吗?
谢谢!