IMHO, the documentation is ambiguous when it comes to specifying the names of the terminals correctly for use in functions like DAQmxCfgSampClkTiming. If the full names of the pins were available from a function call in a comma separated list, they could be easily parsed out and then used in a subsequent DAQmx function call.
I spent a couple of hours the other day trying to figure out why my call to get trigger hysteresis was failing with error -200265. "The error Measurements: An attempt has been made to use an invalid analog trigger source."
What I eventually figured out was that this error was partly caused by the fact that the format for the terminal PFI9 I had used in the call to DAQmxCfgSampClkTiming was bad. I found it quite interesting that that attempting to get the trigger hysteresis was giving an error that turned out to be related to the terminal I had specified for the sample clock.
Personally, if I had been able to pick a string from a list that was returned by a function call to the device, I think things may have gone much easier.
Best Regards,
Matthew