diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
commit | 3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch) | |
tree | 3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /plugins/Updater/scan.cpp | |
parent | 537b94169bf2483798a651ee3b96f7904eebe7b4 (diff) |
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively
- total internal redesign of options' translation
- code reformatting
git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Updater/scan.cpp')
-rw-r--r-- | plugins/Updater/scan.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/Updater/scan.cpp b/plugins/Updater/scan.cpp index ddae89dc43..2144f80fbc 100644 --- a/plugins/Updater/scan.cpp +++ b/plugins/Updater/scan.cpp @@ -1,7 +1,6 @@ #include "common.h"
#include "scan.h"
-typedef PLUGININFO * (__cdecl * Miranda_Plugin_Info) ( DWORD mirandaVersion );
typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_Info_Ex) ( DWORD mirandaVersion );
struct AlternateShortName
@@ -56,10 +55,9 @@ void ScanPlugins(FilenameMap *fn_map, UpdateList *update_list) TCHAR plugins_folder[MAX_PATH], dll_path[MAX_PATH];
TCHAR *dll_name;
- Miranda_Plugin_Info dll_info_func;
Miranda_Plugin_Info_Ex dll_info_func_ex;
DWORD mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
- PLUGININFO *pluginInfo;
+ PLUGININFOEX *pluginInfo;
GetRootDir(plugins_folder);
_tcscat(plugins_folder, _T("\\Plugins"));
@@ -92,9 +90,8 @@ void ScanPlugins(FilenameMap *fn_map, UpdateList *update_list) }
if (hModule)
{
- dll_info_func = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfo");
dll_info_func_ex = (Miranda_Plugin_Info_Ex)GetProcAddress(hModule, "MirandaPluginInfoEx");
- if ((dll_info_func_ex && (pluginInfo = (PLUGININFO *)dll_info_func_ex(mirandaVersion))) || (dll_info_func && (pluginInfo = dll_info_func(mirandaVersion))))
+ if (dll_info_func_ex && (pluginInfo = (PLUGININFOEX*)dll_info_func_ex(mirandaVersion)) != NULL)
{
// *** This is a dodgy and unfair hack...
// In order to disable new plugins that may be unintentionally installed with an update,
@@ -254,10 +251,9 @@ bool RearrangeDllsWorker(char *shortName, StrList &filenames, TCHAR *basedir) TCHAR file_path[MAX_PATH];
- Miranda_Plugin_Info dll_info_func;
Miranda_Plugin_Info_Ex dll_info_func_ex;
DWORD mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
- PLUGININFO *pluginInfo;
+ PLUGININFOEX *pluginInfo;
HMODULE hModule;
// add filemask
@@ -272,9 +268,8 @@ bool RearrangeDllsWorker(char *shortName, StrList &filenames, TCHAR *basedir) mir_sntprintf(file_path, SIZEOF(file_path), _T("%s\\%s"), basedir, findData.cFileName);
if (valDllName(findData.cFileName) && (hModule = LoadLibrary(file_path)))
{
- dll_info_func = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfo");
dll_info_func_ex = (Miranda_Plugin_Info_Ex)GetProcAddress(hModule, "MirandaPluginInfoEx");
- if ((dll_info_func_ex && (pluginInfo = (PLUGININFO *)dll_info_func_ex(mirandaVersion))) || (dll_info_func && (pluginInfo = dll_info_func(mirandaVersion))))
+ if (dll_info_func_ex && (pluginInfo = (PLUGININFOEX *)dll_info_func_ex(mirandaVersion)) != NULL)
{
bool found = !_stricmp(pluginInfo->shortName, shortName);
if (!found)
|