summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-29 13:20:42 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-29 13:20:42 +0000
commit5a36b78ad280e5026e73cee9faba65f3ec98d997 (patch)
treef863523e35c5012955d5f60683fe7a00ce1400f2 /plugins
parent576239499489b2965be375c4c5a773fdf592ed0d (diff)
oooops
git-svn-id: http://svn.miranda-ng.org/main/trunk@15093 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Toaster/src/add_to_start_menu.h12
1 files changed, 12 insertions, 0 deletions
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