I am clueless how I should convert the following API to VB.NET
Private Const MAXPNAMELEN As Long = 32&
Private Type JOYCAPS
wMid As Integer
wPid As Integer
szPname As String * MAXPNAMELEN
wXmin As Long
wXmax As Long
wYmin As Long
wYmax As Long
wZmin As Long
wZmax As Long
wNumButtons As Long
wPeriodMin As Long
wPeriodMax As Long
End Type
Private Declare Function joyGetDevCaps Lib "winmm.dll" Alias "joyGetDevCapsA" (ByVal id As Long, lpCaps As JOYCAPS, ByVal uSize As Long) As Long
I tried some converters, but what they output was not working.
If anybody is really good, could he try to convert it for me and show me how to call it?
Especially, I don’t know how to instantiate the JOYCAPS when passing it to the function.
I did not find this function on pinvoke.net.
Thank you.
I can’t test it, but this should be the straightforward conversion:
It assumes
System.Runtime.InteropServicesis imported.