Digital I/O

Showing results for 
Search instead for 
Did you mean: 

NIDAQ driver is not accessible after Application shutdown from Visual C++ debugger



I am having a problem using a 6533 card that is controller by an application written using Visual C++ 6.0.


How to replicate the problem:

1) Open my application software in Visual C++ and start the application using the debugger.

 2) Once the system is done initialization (so, I dont stop it in the middle of some task), I stop the application using the debugger stop button (problem doesnt happen if I quit the application and then close the debugger).

3) Open Visual C++ again and try to start application, try to start application from the release executable, or even try to run a different application to diagnose the DIO and none of them are capable of running.


One of the applications I have to test the DIO returns a message saying it cannot access nidaq32.dll (even tough the dll is at windows\system32 and it was working fine until I tried to debug the main application using Visual C++).


Visual C++ fails to load the application in the debugger with 2 messages:

"The application failed to initialize properly (0xc0000142). Click on OK to terminate the application."

"Unhandled exception in Application.exe (NTDLL.DLL): 0xC0000142: DLL Initialization Failed."


I tried to follow these instructions here:


But I do not have any messages in the event logger.


Temporary workaround: REBOOT the computer then everything works fine until I have to stop the application again. Oh, if I have the same problem if a crash happens during a debug session.


One last thing: we also tried to update our Traditional NI-DAQ library (we use the legacy driver) from 7.4.1F4 to 7.4.4F7 but it didnt help.


Any suggestions? All help is greatly appreciated.

Message Edited by leosgb on 02-04-2009 04:52 PM
0 Kudos
Message 1 of 3



To make sure I understand your issue.  You are running a 6533 with Visual C++ 6.0 using NI-DAQ. When you.


1. Open the program in Visual C++

2. Start the application using the debugger

3. Wait for system to finish initialization

4. Stop the application with the debugger stop


-this is where i get a little lost, do you close the application and reopen it or do you open another copy of it.


5. Unable to open any application using NI-DAQ with the error listed below


If that is correct it sounds like expected behaviour, as the resources opened to the DAQ dll were not closed properly, that would also explain why this does not occur if you quit the application normally.  Rebooting the computer would close any open references that were still open.


Hope this helps


Doug F

Applications Engineer

National Instruments
Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions
0 Kudos
Message 2 of 3

Hi Doug,


We actually stop the application completey (we can do this in other computers) and then restart it. But in these computers it would keep the drivers allocated somehow.


I realized that I installed this Tektronix-NI instrument control thing and that was the cause of my problem. I just had to remove it, reinstall the Traditional NI-DAQ and it works again!


If I only saw that last night 🙂


Thank you for your help tough. See you in the forums.

0 Kudos
Message 3 of 3