My app works fine on Mac, but has problem on Win7 64bits. I'm using the latest Juce version, compiling on Win using vs2012 express.
I'm sending/receiving sysexs to/from a USB MIDI device attached.
Both Mac and Win work fine when my app runs, anyway, when I want to update the firmware of the attached USB MIDI keyboard, I send a Sysex to the device that makes it disconnecting/reconnecting with a different device name (it restarts in boot loader mode).
Once this sysex is sent, my app scans MIDI devices until it finds the new attached device (checking device name). This new device is found without problem, so I close the previous MIDI in and out, and reopen both with the new attached device, anyway, i'm no longer able to send Sysex to this new device.
It works perfectly on Mac, but on Win7, the midiOutPrepareHeader() in MidiOutput::sendMessageNow (const MidiMessage& message) returns something different than MMSYSERR_NOERROR. My sysex is not sent on Win, while it works fine on Mac.
I double checked the parameters passed to midiOutPrepareHeader() and everything seems ok to me.
I was wondering if closing Midi in & out when the new device is found, then reopen both with the new device is enough ? Is there a way to reset all MIDI in & out to be sure everything is flushed correctly before communicating with the new attached device ? I did not find any relevant function for this.
Thanks for any help.