Cycling ’74 has published a tutorial on using ReWire to move MIDI and audio data between programs on a computer. It’s by Darwin Grosse, one of their development gurus and the publisher of the Creative Synth site.
It written from the Max/MSP perspective and demonstrates how you can create patches controlled by the host app.