I am developing a program in C using the PCAN-Developer, beginning at which a number of PCAN-clients are being registered. The program is being used for debugging purposes, which means it may be quite frequently started.
So what I'd like to do is call a routine to remove/kill all registered clients on termination of that program.
However, when disconnecting and removing the clients using atexit(DisconnectAll) I receive an CAN_ERR_NODRIVER. This doesn't occur if DisconnectAll is called during runtime.
Now I've read here, regarding PCAN-Basic:
http://www.peak-system.com/forum/viewto ... =41&t=1226
CanApi2 doesn't contain CAN_Uninitialize, but I'm still wondering whether the same applies to the PCAN-Developer and if so, is there a way to work around this?PCAN-Basic just know when applications attached to it terminates (normal, or abnormal) and closes all opened channels. So atexit calls Uninitialize on an uninitialized channel ...
Thanks & best regards,