Not sure what exactly code you need, but this question was already discussed here http://www.ntkernel.com/forum/viewtopic.php?t=19 along with some code postings.