AnsweredAssumed Answered

PNA-X control using VC++ 2010 over GPIB "heap pointer error"

Question asked by aceofbase on Jan 27, 2014
Hi all,

Using the example provided by NI for instrumentation control I initially wrote all the code in C++ and debugged it to get it to work. 
Work includes: connecting to the PNA, setting up for a sweep, acquiring data and storing it in a CSV file.

I am trying to implement this code in a GUI and have encountered a heap pointer error. the code debugs and builds fine but during execution of the following command line.

pna = ibdev(BDINDEX, PRIMARY_ADDR_OF_PNA, NO_SECONDARY_ADDR, TIMEOUT, EOTMODE, EASMODE);

I get the error:
"DEBUG ASSERTION FAILED!"
Expression: _CrtIsValidHeapPointer(pUserData)


Does anyone know how to solve this problem?

Thanks,  

Outcomes