Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Contact info
 
Other projects
   Altirra

Archives

Blog Archive

"Hello, world!" is a lot bigger than I remember it

I wanted to hack together a particular variant of expression evaluator, but wanted an editor a bit more substantial than the usual Notepad I use for quick hacks. So I fired up Visual Studio 2005, and on a whim, decided to select "CLR Console Application." And so VS2005 set up a sample console Hello World! application for me. C++/CLI is still C++, so the source code file mostly looks the same, just that it uses .NET console commands.

Oh, and the project comes with an icon, a resource script, stdafx.cpp/.h, an assembly info module, and a readme. I guess I can deal with that for a throwaway project.

Then I run it, and I see these DLL load messages in the debugger:

'arith.exe': Loaded 'D:\projwin\arith\debug\arith.exe', Symbols loaded.
'arith.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.
'arith.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcm80d.dll', Symbols loaded.
'arith.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\lpk.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcr80.dll', Symbols loaded.
'arith.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll', No symbols loaded.
'arith.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll'
'arith.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\813d7cb23dfcd94ebf2b2429ea4bcb50\mscorlib.ni.dll', No native symbols in symbol file.
'arith.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Symbols loaded.
'arith.exe' (Managed): Loaded 'd:\projwin\arith\debug\arith.exe', Symbols loaded.
'arith.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll', Symbols loaded (source information stripped).
'arith.exe': Loaded 'C:\WINDOWS\system32\rsaenh.dll', Symbols loaded (source information stripped).
'arith.exe' (Managed): Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcm80d.dll', Symbols loaded.
'arith.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\92defad1f6443a41812dd46665fe005c\System.ni.dll', No native symbols in symbol file.
'arith.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Symbols loaded.

WTF?

I try to convince myself that I'm a assembly/C++ luddite and I should try to learn more of this .NET stuff. Every time I do, I see stuff like this that makes me cringe. Why does a Hello World application require the common controls library, shell API, and remote procedure call runtime??

Here's what I get from a good old fashioned Win32 Hello World app made by VS2005, for comparison:

'arith2.exe': Loaded 'D:\projwin\arith2\Debug\arith2.exe', Symbols loaded.
'arith2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Symbols loaded (source information stripped).
'arith2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Symbols loaded (source information stripped).
'arith2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.
'arith2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Symbols loaded (source information stripped).

Comments

This blog was originally open for comments when this entry was first posted, but was later closed and then removed due to spam and after a migration away from the original blog software. Unfortunately, it would have been a lot of work to reformat the comments to republish them. The author thanks everyone who posted comments and added to the discussion.