Imports System.Runtime.InteropServices
Module Module1
Declare Function joyGetPosEx Lib "winmm.dll" (ByVal uJoyID As Integer, ByRef pji As JOYINFOEX) As Integer
<StructLayout(LayoutKind.Sequential)> Public Structure JOYINFOEX
Public dwSize As Integer
Public dwFlags As Integer
Public dwXpos As Integer
Public dwYpos As Integer
Public dwZpos As Integer
Public dwRpos As Integer
Public dwUpos As Integer
Public dwVpos As Integer
Public dwButtons As Integer
Public dwButtonNumber As Integer
Public dwPOV As Integer
Public dwReserved1 As Integer
Public dwReserved2 As Integer
End Structure
Public myjoyEX As JOYINFOEX
End Module