Just to save you time.
When using Juce with my Oxygen8 keyboard as the MIDI input device, on win32, the code always crashed relatively soon after leaving stop(), albeit in a separate thread, reporting a corrupt heap.
Using any other MIDI input devices as the source, I didn’t get this problem (e.g. MIDI Yoke input ports).
This all worked fine in Mac land, of course.
Solution: I downloaded and installed a “pukka” driver from M-Audio; the built-in “class compliant” drive in Windowx XP simply didn’t work!
Only wasted an entire morning on this.