Callback function question

BlitzMax Forums/BlitzMax Programming/Callback function question

That's why I'm a bit confused why your midiInOpen function works even though you haven't added "win32" to it.
That function is an API function, and in the BMAX code is declared between the 'Extern' statements:
Extern "Os"
Function midiInOpen(lphMidiIn:Int Var, uDeviceID:Int, dwCallback:Int ,dwInstance:Int, dwFlags:Int)
End Extern

Have you tried calling "midiInOpen" several times? Because sometimes you won't get an error unless you call it more than once.
Well, I call it one time only, then read the midi input, then close it.
So I didn't try to call it several time because I can't call it more than once - I mean, when the midi input is already opened, I can't re-open it.

By the way, thank you for the explanation. The more I read on this forum, the more I learn.
The problem is that I forget it later !!!

Sergio.