I can\'t find documentation for how to do it, which makes me think I\'m not supposed to do it.
Comment in this link will help you out, its too much to cut/paste here. Source is C++ as you didn't specify a language I dont think it will matter.
The Link
EDIT: For the record, I am not saying it's a good idea.