Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I reset the CAN card before it can be used for transmit from VC++

I am using a tool developed in VC++ to send and receive the CAN data ove NI-CAN card. The application is designed in with different threads, which will call the NI-Card for sending and receiving messages.One thread will use the card for sending, others will be waiting for the completion. Once one thread completes next which is there in the queue will take control over CAN card and will release after using it. So other threads can use it. Every thread will follow initialize -> send -> uninitialize sequence. I am facing a problem If more threads are used, the can card is giving the NI can card initialization failed. Only way to use the CAN card after it is failed is to restart the complete operating system

 

Is there any function to reset the CAN card driver from VC++ (it is using NI drivers) before it is initialized to avoid restarting the system?

 

Please help. 

Message Edited by Md_Sajid on 09-17-2009 01:44 AM
0 Kudos
Message 1 of 1
(6,240 Views)