Wrote up the code from the Interacting with C Pointers blog post.