Here is the MSDN link for the SDK sample mentioned above if you don't want to install the whole Windows SDK:

http://msdn2.microsoft.com/en-us/library/ms756482.aspx

However, the example application shows many things and depends on WPF, so to be able to compile/run it, you'll need it anyway.