在Visual Studio 2010中开发的My C ++ / CLI程序在调试和发布模式下运行良好,如果我在Visual Studio中启动它,但如果我启动可执行文件,它在发布和调试模式下都不会执行任何操作)。当我检查任务栏时,我看到程序作为一个进程运行,但它没有显示任何内容。调试输出复制如下:
'client.exe': Loaded 'C:\Users\Elena\Documents\Visual Studio 2010\Projects\PanguC3_20Aug13\Debug\client.exe', Symbols loaded. 'client.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\mscoree.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\kernel32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\wsock32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\ws2_32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\nsi.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\apphelp.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\sspicli.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\user32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\gdi32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\lpk.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\usp10.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\shell32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\ole32.dll', Symbols loaded. 'client.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\userenv.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\profapi.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\winspool.drv', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\mpr.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\imm32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\msctf.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Program Files\NVIDIA Corporation\NvStreamSrv\rxinput.dll', Binary was not built with debug information. 'client.exe': Loaded 'C:\Windows\System32\advapi32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\sechost.dll', Symbols loaded (source information stripped). 'client.exe': Unloaded 'C:\Program Files\NVIDIA Corporation\NvStreamSrv\rxinput.dll' 'client.exe': Unloaded 'C:\Windows\System32\advapi32.dll' 'client.exe': Unloaded 'C:\Windows\System32\sechost.dll' 'client.exe': Loaded 'C:\Windows\System32\advapi32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\sechost.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\msvcr100_clr0400.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\c799474a067f07ef3a167d75029fa012\mscorlib.ni.dll', No native symbols in symbol file. 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Symbols loaded. 'client.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\nlssorting.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Symbols loaded (source information stripped). 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\Elena\Documents\Visual Studio 2010\Projects\PanguC3_20Aug13\.\Debug\client.exe', Symbols loaded. 'client.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System\fc16a5cafc433e6d942e9bd5b14fbeaf\System.ni.dll', No native symbols in symbol file. 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Symbols loaded. 'client.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Drawing\7e3570a0cc71998e14e7adb8e4ea0cbb\System.Drawing.ni.dll', No native symbols in symbol file. 'client.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\6da40f01a719972f3242d3c374e499c5\System.Windows.Forms.ni.dll', No native symbols in symbol file. 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Symbols loaded. 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Symbols loaded. 'client.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'ImageAtBase0x7a400000', Loading disabled by Include/Exclude setting. 'client.exe': Unloaded 'ImageAtBase0x7a400000' 'client.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'ImageAtBase0xf060000', Loading disabled by Include/Exclude setting. 'client.exe': Loaded 'ImageAtBase0x7f0000', Loading disabled by Include/Exclude setting. 'client.exe': Unloaded 'ImageAtBase0xf060000' 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualBasic.PowerPacks.Vs\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.PowerPacks.Vs.dll', Symbols loaded. 'client.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18120_none_72d2e82386681b36\GdiPlus.dll', Symbols loaded (source information stripped). 'client.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Core\3c2edeaaa3e117b0375bacf8fd971b1e\System.Core.ni.dll', No native symbols in symbol file. 'client.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\Microsoft.VisualBas#\c136c62671091b281c6d6cb5a093fc26\Microsoft.VisualBasic.ni.dll', No native symbols in symbol file. 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Symbols loaded. 'client.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Symbols loaded. The thread 'Win32 Thread' (0x90c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xc54) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x15c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x11f4) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x11b8) has exited with code 0 (0x0). The program '[884] client.exe: Managed (v4.0.30319)' has exited with code 0 (0x0). The program '[884] client.exe: Native' has exited with code 0 (0x0).