Try this
static LPSAFEARRAY SampleArray;
hResult = AXFifo4Prj__AXFifo4CaptureChBFifo (axfifo4Handle, &err, &numSamples,
SampleArray, &twosComplement, &vBool ); //&*SampleArray
...
...
CA_SafeArrayTo1DArray (
&SampleArray, CAVT_DOUBLE,&datapoints,&numSamples);
Note : The above safe array function has been superceded by CA_SafeArrayTo1DArrayEx(). And remember to use CA_FreeMemory() to free the C array that is returned.
Hope this helps
Bilal Durrani
NI