Hi,
thanks for the reply. However:
1./ I checked:
only the example programs
...\VisualC\Ai\*.c
and ...\VisualC\Cdio\*.c
programs use DAQ_Clear(), the others do not. Maybe the other sample programs leave back the operating system in a crash-near state?
2./ The DAQ_Clear() description said:
"If your application calls DAQ_Start, SCAN_Start, or Lab_ISCAN_Start, always make sure you call DAQ_Clear before your application terminates and returns control to the operating system. Unpredictable behavior can result unless you call DAQ_Clear (either directly, or indirectly through DAQ_Check, Lab_ISCAN_Check, or DAQ_DB_Transfer)."
In my vocabulary, the "Unpredictable behavior" means only a chance to crash my own application, but not that of the operating system. So I think the documentation is wrong at this point.
3./ I did not use any of the functions mentioned. Yes, I understand it is one of the "Low-Level Data Acquisition Functions", but neither of the higher lever function mentions which low level functions are called. I guess that my function DIG_Block_In() uses SCAN_Start() some time, but I could not figure out which low-level function DIG_SCAN_Setup() uses. I think this information *must* be included in the docs. How can I find out which low level functions are used by the high level functions if the docs do not include this information?
4./ I do not really understand the warning in the docs of SCAN_Start:
"You must use the SCAN_Setup and SCAN_Start functions as a pair. Making a single call to SCAN_Setup with multiple calls to SCAN_Start fails and returns error code -122 (noSetupError)."
Although I cannot completely follow down because of the lack of documentation and source, if my functions use the two named functions, but I definitely used in my program a setup once and a start many times, and without problems. In additition, I do not see any parameter in the prototype "SCAN_Setup (deviceNumber, numChans, chanVector, gainVector)" which needs repeated initialization after calling a "SCAN_Start(). Could you please comment this?
5./ In the case of closed-source libraries I do not have a chance to figure out from the source (in a hard but possible way) what actually the function calls do, so the documentation *must* give me the information I need. I think it is not the case in connection with these function calls.
6./ If one takes some actions from user space to the kernel space, one *must* take care of the chance of crashing the operating system. In case of user failure, one is allowed to return an error condition or not to carry out the action, but never to crash. It is a serious security hole and I consider it as a result of poor design.
Best regards
Janos