Garland,
A good starting point would be the DAQsingleBufStopTrig.c example that is included when NI-DAQ is installed with support for LabWindows/CVI.
To have x points before the trigger and n points after the trigger, you configure a buffered data acquisition with a buffer size x+n and specify in DAQ_StopTrigger_Config that you want n points after the trigger. The result will be a buffer of data including x points before the trigger and n points after.
Regards,
Molly K.
National Instruments
Molly K.
Web Support & Operations Manager
National Instruments