What is the recommended way to set the resolution of a webcam using DirectShow?

Q. Why does my DirectShow based video capture application fail to set resolution for the LifeCam VX-6000/VX-3000 webcam when LifeCam software is installed in the system? Is there any way to resolve this issue programmatically? Here is the code snippet that I am using to set webcam resolution: IAMStreamConfig *pConfig = NULL; IPin *pPin =…