That's an interesting question I dont know the answer too. But can help you along the way to find some clues. A quick google brought me to something called WinUSB, WIA (Windows Image Acquisition) and WPD (Windows Portable Devices). I dont know wether or not there are different api's for integrated hardware or usb hardware. I would guess so.
Since your webcam probably allready has driver installed (comes with Windows, it detects etc.). There is probably some format/protocol to communicate via any of the devices (with recieve and send), which one this is I dont know, since I havent done much programming against hardware devices.
Oh and btw, I suddenly just found something using DirectShow, I probably think that would be the first and easiest attempt to do something like this