Hi,
You can use the daqmx examples that are installed with the driver. Check Program Files>National Instruments>NI-DAQ>Examples. There you have some Digital I/O examples for Visual C and Ansi C that you can use. They include some change detection examples too. Also take a look at the Daqmx Reference manual. There you can find all the functions for change detection. Check the Ni-daq directory in the Start folders.
Regards.
JV
AE
NIBE