From 5a36b78ad280e5026e73cee9faba65f3ec98d997 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 29 Aug 2015 13:20:42 +0000 Subject: oooops git-svn-id: http://svn.miranda-ng.org/main/trunk@15093 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/add_to_start_menu.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/Toaster/src/add_to_start_menu.h (limited to 'plugins/Toaster/src/add_to_start_menu.h') diff --git a/plugins/Toaster/src/add_to_start_menu.h b/plugins/Toaster/src/add_to_start_menu.h new file mode 100644 index 0000000000..0fd3bf6171 --- /dev/null +++ b/plugins/Toaster/src/add_to_start_menu.h @@ -0,0 +1,12 @@ +wchar_t* GetShortcutPath(); +HRESULT InstallShortcut(_In_z_ wchar_t *shortcutPath); + +__forceinline bool ShortcutExists() +{ + return !(GetFileAttributes(ptrW(GetShortcutPath())) < 0xFFFFFFF); +} + +__forceinline HRESULT TryCreateShortcut() +{ + return (ShortcutExists() ? S_OK : InstallShortcut(ptrW(GetShortcutPath()))); +} \ No newline at end of file -- cgit v1.2.3