if (_tcsstr(lpCmdLine,TEXT("-break"))) { LOG(TEXT("debugger breakpoint")); #ifdef _MSC_VER __asm int 3 #else asm("int3"); #endif }
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nShowCmd){	CONTEXT("WinMain()");	 // create desktop window and task bar only, if there is no other shell and we are	 // the first explorer instance	BOOL startup_desktop = !IsAnyDesktopRunning();	bool autostart = true;#ifdef _DEBUG	//MF: disabled for debugging	autostart = false;#endif	 // If there is given the command line option "-desktop", create desktop window anyways	if (_tcsstr(lpCmdLine,TEXT("-desktop")))		startup_desktop = TRUE;	if (_tcsstr(lpCmdLine,TEXT("-nodesktop")))		startup_desktop = FALSE;	if (_tcsstr(lpCmdLine,TEXT("-noexplorer"))) {		nShowCmd = SW_HIDE;		startup_desktop = TRUE;	}	if (_tcsstr(lpCmdLine,TEXT("-noautostart")))		autostart = false;#ifndef __WINE__	if (_tcsstr(lpCmdLine,TEXT("-console"))) {		AllocConsole();		_dup2(_open_osfhandle((long)GetStdHandle(STD_INPUT_HANDLE), _O_RDONLY), 0);		_dup2(_open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), 0), 1);		_dup2(_open_osfhandle((long)GetStdHandle(STD_ERROR_HANDLE), 0), 2);		g_Globals._log = fdopen(1, "w");		setvbuf(g_Globals._log, 0, _IONBF, 0);		LOG(TEXT("starting explorer debug log\n"));	}#endif	bool use_gdb_stub = false;	// !IsDebuggerPresent();	if (_tcsstr(lpCmdLine,TEXT("-debug")))		use_gdb_stub = true;	 // activate GDB remote debugging stub if no other debugger is running	if (use_gdb_stub) {		LOG(TEXT("waiting for debugger connection...\n"));		initialize_gdb_stub();	}	g_Globals._hInstance = hInstance;#ifndef __MINGW32__	// SHRestricted() missing in MinGW (as of 29.10.2003)	g_Globals._SHRestricted = (DWORD(STDAPICALLTYPE*)(RESTRICTIONS)) GetProcAddress(GetModuleHandle(TEXT("SHELL32")), "SHRestricted");#endif	HWND hwndDesktop = 0;	if (startup_desktop)	{		hwndDesktop = DesktopWindow::Create();		if (autostart)		{			char* argv[] = {"", "s"};	// call startup routine in SESSION_START mode			startup(2, argv);		}	}	int ret = explorer_main(hInstance, hwndDesktop, nShowCmd);	return ret;}