Ask on a Ogg specific mailing lists. You are more likely to find someone who knows what how to do this there. Show them what you have tried, so they can point out what you are doing wrong. Your first question looks like someone who didn't read the book, and that will make them mad. Your second question makes it clear that you read the book (the right one?), so the book needs to be fixed. Before doing that though, try it. Write a somple C program, and try calling that function with all the options you can think of to see what happens. Then look at the results elsewhere to see what really happened.