I am trying to get info returned by a windows API function. Is it possible to use VAR with user defined types?
With the code below, some garbarge info is returned then it crashes.
Any help would be most welcome.
With the code below, some garbarge info is returned then it crashes.
Type MIDIOUTCAPS Field wMid:Short Field wPid:Short Field vDriverVersion:Int' MMVERSION Field szPname:Byte[32] 'String[MAXPNAMELEN] Field wTechnology:Short Field wVoices:Short Field wNotes:Short Field wChannelMask:Short Field dwSupport:Int EndType Extern "Os" Function midiOutGetNumDevs() Function midiOutGetDevCapsA( uDeviceID:Int, lpCaps:MIDIOUTCAPS Var, uSize:Int) ' Var = By Ref End Extern Local MaxOutDev = midiOutGetNumDevs() Print "MaxOutDev = "+MaxOutDev Local InfoOut:MidiOutCaps For count = -1 To MaxOutDev Print "DEVICE : "+count midiOutGetDevCapsA(count,InfoOut:MidiOutCaps, 52) If (InfoOut<> Null) Then Print "wMid "+Int(InfoOut.wMid) Print "wPid "+Int(InfoOut.wPid) Print "vDriverVersion "+InfoOut.vDriverVersion 'Print "szPname" Print "wTechnology " + InfoOut.wTechnology Print "wVoices " + InfoOut.wVoices Print "wNotes "+ InfoOut.wNotes Print "wChannelMask " + InfoOut.wChannelMask Print "dwSupport " + InfoOut.dwSupport EndIf Next
Any help would be most welcome.