Sqlnclir.rll keeps loading and unloading

I am working with SQL Native Client 9 in a C ++ application that interacts with SQL Server 2000. I am currently working on debugging things, but something I noticed that bothers me (mainly because it creates significant clutter) that sqlnclir.rll is being loaded and unloaded continuously, and the following lines are spammed into my debug output window.

'my_app.exe': Loaded 'C:\WINDOWS\system32\sqlnclir.rll', Binary was not built with debug information.
The thread 'Win32 Thread' (0x9f4) has exited with code 0 (0x0).
'my_app.exe': Unloaded 'C:\WINDOWS\system32\sqlnclir.rll'

      

The ID after "Win32 Thread" changes, but the exit code is always 0.

Why is the .rll loading and unloading the same way how can I prevent this?

If you cannot answer this question, how can I prevent the messages above from propagating in the Debug Output window in MSVC 2005? Ideally, just for that particular set of messages?

+1


source to share


1 answer


This is usually because the application (or in this case the linked library) is dynamically loaded and unloaded via LoadLibrary [Ex], etc. Perhaps this also creates / destroys a thread in the process.

I don't know how to suppress individual debug output messages. You can prevent a specific reload / unload by loading the library yourself and holding the handle to it for the entire duration of the calls (which should prevent the OS from unloading it). However, this is not a good general solution (for example, the library might be [badly] coded to rely on DLL uninitialization between each call, in which case the workaround might change the behavior).



At a higher level, keeping the connection open to the database can accomplish the same thing, but it depends on the native SQL client library implementation. This is what I would probably try though (or just ignore the debug trace output).

+1


source







All Articles