@jackie_w: FYI I have added wrappers for all functions i described earlier to calibre, so you dont need to depend on any external libraries. In fact I have even added code to directly output mp3 files, so you can drop lame.exe as well.
You can see how to use it by reading the tests in this file:
https://github.com/kovidgoyal/calibr...ows/winsapi.py
It was surprisingly easy, only about 500 lines of code.