if (!nsNativeAppSupportWin::mCanHandleRequests) return 0;
    static long CALLBACK WindowProc( HWND msgWindow, UINT msg, WPARAM wp, LPARAM lp ) {        if ( msg == WM_COPYDATA ) {            // This is an incoming request.            COPYDATASTRUCT *cds = (COPYDATASTRUCT*)lp;#if MOZ_DEBUG_DDE            printf( "Incoming request: %s\n", (const char*)cds->lpData );#endif            (void)nsNativeAppSupportWin::HandleRequest( (LPBYTE)cds->lpData );            // Get current window and return its window handle.            nsCOMPtr<nsIDOMWindowInternal> win;            GetMostRecentWindow( 0, getter_AddRefs( win ) );            return win ? (long)hwndForDOMWindow( win ) : 0;  } else if ( msg == WM_QUERYENDSESSION ) {    // Invoke "-killAll" cmd line handler.  That will close all open windows,    // and display dialog asking whether to save/don't save/cancel.  If the    // user says cancel, then we pass that indicator along to the system    // in order to stop the system shutdown/logoff.    nsCOMPtr<nsICmdLineHandler>        killAll( do_CreateInstance( "@mozilla.org/commandlinehandler/general-startup;1?type=killAll" ) );    if ( killAll ) {        nsXPIDLCString unused;        // Note: "GetChromeUrlForTask" is a euphemism for        //       "ProcessYourCommandLineSwitch".  The interface was written        //       presuming a less general-purpose role for command line        //       handlers than it ought to have.        nsresult rv = killAll->GetChromeUrlForTask( getter_Copies( unused ) );        if ( rv == NS_ERROR_ABORT ) {            // User cancelled shutdown/logoff.            return FALSE;        } else {            // Shutdown/logoff OK.            return TRUE;        }    }  }  return DefWindowProc( msgWindow, msg, wp, lp );}