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 :-(.