]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/window.c
Remove duplicate definition of AGENT_MAX_MSGLEN.
[PuTTY.git] / windows / window.c
index b1530dbcb17997b78828707fad94f771eb9b4341..5ef3a46077157fd33d603f0e9466c2e0df48d041 100644 (file)
@@ -229,6 +229,11 @@ void frontend_echoedit_update(void *frontend, int echo, int edit)
 {
 }
 
+int frontend_is_utf8(void *frontend)
+{
+    return ucsdata.line_codepage == CP_UTF8;
+}
+
 char *get_ttymode(void *frontend, const char *mode)
 {
     return term_get_ttymode(term, mode);
@@ -342,6 +347,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
     HRESULT hr;
     int guess_width, guess_height;
 
+    dll_hijacking_protection();
+
     hinst = inst;
     hwnd = NULL;
     flags = FLAG_VERBOSE | FLAG_INTERACTIVE;
@@ -350,6 +357,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
 
     InitCommonControls();
 
+    /* Set Explicit App User Model Id so that jump lists don't cause
+       PuTTY to hang on to removable media. */
+
+    set_explicit_app_user_model_id();
+
     /* Ensure a Maximize setting in Explorer doesn't maximise the
      * config box. */
     defuse_showwindow();
@@ -391,21 +403,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
        return 1;
     }
 
-    /*
-     * Protect our process
-     */
-    {
-#if !defined UNPROTECT && !defined NO_SECURITY
-        char *error = NULL;
-        if (! setprocessacl(error)) {
-            char *message = dupprintf("Could not restrict process ACL: %s",
-                                      error);
-           logevent(NULL, message);
-            sfree(message);
-           sfree(error);
-       }
-#endif
-    }
     /*
      * Process the command line.
      */