Sign in to follow this  
SunTzu

Mystery DLL linkage

Recommended Posts

Hi, I'm developing a very simple command-line app under MS Visual Studio .NET 2003. It's not using managed code, and is supposed to be linking several static libraries (.lib) into an exe. However, when I run the exe, it spends about five seconds or so doing the following: 'execampaign_cliD.exe': Loaded 'C:\My Code\InquisitorCampaigns\execampaign_cliD.exe', Symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\mscoree.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\advapi32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\rpcrt4.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\shlwapi.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\gdi32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\user32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\msvcrt.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msvcr71.dll', Symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\ole32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\shell32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\system32\comctl32.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\assembly\NativeImages1_v1.1.4322\mscorlib\1.0.5000.0__b77a5c561934e089_e4ba7bc3\mscorlib.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\diasymreader.dll', No symbols loaded. 'DefaultDomain': Loaded 'f:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'execampaign_cliD.exe': Loaded 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorsn.dll', No symbols loaded. 'execampaign_cliD': Loaded 'c:\My Code\InquisitorCampaigns\execampaign_cliD.exe', Symbols loaded. ...and since the app itself takes less than half a second this is really frustrating. Strangest of all, I've found that commenting out certain bits of code (with no apparent pattern) avoids 90% of the above and it runs instantly. I'm really confused - none of the .sln or .proj files reference any DLLs at all and I don't understand why it's loading all of the above, or how to prevent it from doing so. Can anybody help? Many thanks.

Share this post


Link to post
Share on other sites
Several of those are system dlls that contain code to make the console work and such like that. Others are parts of the .Net framework, which indicates that either you are using managed code or your project is telling VS you're using managed code even when you're not.

Also, those messages suggest you're running the exe inside VS with debugging (meaning you hit F5 instead of control-F5). When you run with debugging, VS tries to load debug info on all the DLLs you help you debug, but since they're system DLLs and not your own, you don't have the debug info for them.

Share this post


Link to post
Share on other sites
Interesting. I had suspected it might be something like that. But, I'm not sure why... I have "Use managed extensions" set to "No" and can't see any other managed code options so I don't know why it would think I'm using managed code.

I am indeed running with debugging, that's correct.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this