if you are using windoze, which I guess you're not

, you could use COM Libraries
I haven't used these but a friend of mine has been doing this. (c++ % com)
or is there something like com for linux?
but using csv is cetainly the better alternative and a lot faster. (com is purty slow)