I don't think I quite understand what you mean by your last reply.
Isn't there any sample code somewhere that will show this?