#include <canlib.h> canStatus canGetNumberOfChannels(int * channelCount);
This function returns the number of available CAN channels in the computer. The virtual channels are included in this figure.
canOK (zero) if success canERR_xxx (negative) if failure.
canGetChannelData
An example.