We are interested using scan on several channels with synchronous method for PCI-6110. We compile the national examples Scansinglebufsync.c. At running we get an 10003 error. We verify the parameters and no problem found.
It appears that you modified iNumChans to be 4 instead of two, but the arrays piChanVect and piGainVect still contain only 2 elements. You must be consistent and provide the 4 gains and 4 channel numbers if you set the number of channels to 4.
If you are just starting your development, I would highly recommend beginning with the DAQmx API instead of the Traditional DAQ one. DAQmx is our new API which is much easier to use than Traditional DAQ and also has performance improvements as well. Here's where you can find the some ANSI C DAQmx examples: