diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-07-11 21:55:18 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-07-11 21:55:18 +0000 |
commit | 987abc0e1d9f8f32d5565701743b40d6c0326e9e (patch) | |
tree | 0610d639605be6389c7d99f70c7fd355c3116a9c | |
parent | 2bbcdb330bbf4d3bbd636f7014ee447c9be95495 (diff) |
Forbit loading WUMF without admin privileges.
git-svn-id: http://svn.miranda-ng.org/main/trunk@912 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/WhoUsesMyFiles/wumf.h | 1 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/wumfplug.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/plugins/WhoUsesMyFiles/wumf.h b/plugins/WhoUsesMyFiles/wumf.h index b256ccb405..5535ae0c5f 100644 --- a/plugins/WhoUsesMyFiles/wumf.h +++ b/plugins/WhoUsesMyFiles/wumf.h @@ -4,6 +4,7 @@ #include <commctrl.h>
#include <lm.h>
#include <locale.h>
+#include <shlobj.h>
#include "newpluginapi.h"
#include "m_system.h"
diff --git a/plugins/WhoUsesMyFiles/wumfplug.c b/plugins/WhoUsesMyFiles/wumfplug.c index 1a547d1ad0..9bcb59540b 100644 --- a/plugins/WhoUsesMyFiles/wumfplug.c +++ b/plugins/WhoUsesMyFiles/wumfplug.c @@ -294,6 +294,11 @@ static INT_PTR WumfMenuCommand(WPARAM wParam,LPARAM lParam) __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
+ if (!IsUserAnAdmin()) {
+ MessageBox(NULL, "Plugin WhoUsesMyFiles cannot be loaded. It requires admin privileges.", "Miranda IM", MB_OK);
+ return NULL;
+ }
+
return &pluginInfo;
}
|