SetIsServerMode( PR_TRUE );
mStartupServerMode = PR_TRUE;
nsNativeAppSupportWin::CheckConsole() {    for ( int i = 1; i < __argc; i++ ) {        if ( strcmp( "-console", __argv[i] ) == 0             ||             strcmp( "/console", __argv[i] ) == 0 ) {            // Users wants to make sure we have a console.            // Try to allocate one.            BOOL rc = ::AllocConsole();            if ( rc ) {                // Console allocated.  Fix it up so that output works in                // all cases.  See http://support.microsoft.com/support/kb/articles/q105/3/05.asp.                // stdout                int hCrt = ::_open_osfhandle( (long)GetStdHandle( STD_OUTPUT_HANDLE ),                                            _O_TEXT );                if ( hCrt != -1 ) {                    FILE *hf = ::_fdopen( hCrt, "w" );                    if ( hf ) {                        *stdout = *hf;                        ::fprintf( stdout, "stdout directed to dynamic console\n" );                    }                }                // stderr                hCrt = ::_open_osfhandle( (long)::GetStdHandle( STD_ERROR_HANDLE ),                                          _O_TEXT );                if ( hCrt != -1 ) {                    FILE *hf = ::_fdopen( hCrt, "w" );                    if ( hf ) {                        *stderr = *hf;                        ::fprintf( stderr, "stderr directed to dynamic console\n" );                    }                }                // stdin?                /* Don't bother for now.                hCrt = ::_open_osfhandle( (long)::GetStdHandle( STD_INPUT_HANDLE ),                                          _O_TEXT );                if ( hCrt != -1 ) {                    FILE *hf = ::_fdopen( hCrt, "r" );                    if ( hf ) {                        *stdin = *hf;                    }                }                */            } else {                // Failed.  Probably because there already is one.                // There's little we can do, in any case.            }            // Don't bother doing this more than once.            break;        } else if ( strcmp( "-turbo", __argv[i] ) == 0                    ||                    strcmp( "/turbo", __argv[i] ) == 0                    ||                    strcmp( "-server", __argv[i] ) == 0                                                                  ||                    strcmp( "/server", __argv[i] ) == 0 ) {                     // Start in server mode (and suppress splash screen).               SetIsServerMode( PR_TRUE );                                         __argv[i] = "-nosplash"; // Bit of a hack, but it works!            // Ignore other args.                                               break;                                                          }    }    return;}