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();
clear_jumplist();
}
}
+
+/* Set Explicit App User Model Id to fix removable media error with
+ jump lists */
+
+BOOL set_explicit_app_user_model_id()
+{
+ DECL_WINDOWS_FUNCTION(static, HRESULT, SetCurrentProcessExplicitAppUserModelID,
+ (PCWSTR));
+
+ static HMODULE shell32_module = 0;
+
+ if (!shell32_module)
+ {
+ shell32_module = load_system32_dll("Shell32.dll");
+ GET_WINDOWS_FUNCTION(shell32_module, SetCurrentProcessExplicitAppUserModelID);
+ }
+
+ if (p_SetCurrentProcessExplicitAppUserModelID)
+ {
+ if (p_SetCurrentProcessExplicitAppUserModelID(L"SimonTatham.PuTTY") == S_OK)
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+ /* Function doesn't exist, which is ok for Pre-7 systems */
+
+ return TRUE;
+
+}
void add_session_to_jumplist(const char * const sessionname);
void remove_session_from_jumplist(const char * const sessionname);
void clear_jumplist(void);
+BOOL set_explicit_app_user_model_id();
/*
* Extra functions in winstore.c over and above the interface in