You need to figure out what kind of APIs the webcam driver supports, first.
If it supports WIA (windows image aquisition), your job might be really easy (I know with .NET WIA apis, it seemed to be just a few lines of code).
I wrote an image capture program for a creative webcam, and it only supported DirectShow. It was not easy, and it took hundreds of lines of code, and learning all about DirectShow... not something I really wanted to do :-(.
I don't currently have the DirectX SDK and I don't want to download it because it is huge and I have dial-up. Microsoft doesn't seem to offer it on a CD. Maybe there is somewhere else that I could get it on CD?
that actually displays the stream from the webcam. but someone modified it to take a picture. i can't fidn the link.. but do some google searches using ken varn's name and you will find it. don't have time right now! sorry..