From c9bf0c30a59a922b96713db54e2293fdf7334adf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2012 18:32:23 +0000 Subject: advimg -> Unicode git-svn-id: http://svn.miranda-ng.org/main/trunk@104 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FreeImage/FreeImage_10.vcxproj | 8 ++-- plugins/FreeImage/Source/FreeImage/Plugin.cpp | 66 +-------------------------- 2 files changed, 5 insertions(+), 69 deletions(-) diff --git a/plugins/FreeImage/FreeImage_10.vcxproj b/plugins/FreeImage/FreeImage_10.vcxproj index 972f5f9fab..5a50867e11 100644 --- a/plugins/FreeImage/FreeImage_10.vcxproj +++ b/plugins/FreeImage/FreeImage_10.vcxproj @@ -25,20 +25,20 @@ DynamicLibrary - MultiByte + Unicode DynamicLibrary - MultiByte + Unicode true DynamicLibrary - MultiByte + Unicode DynamicLibrary - MultiByte + Unicode true diff --git a/plugins/FreeImage/Source/FreeImage/Plugin.cpp b/plugins/FreeImage/Source/FreeImage/Plugin.cpp index 8f69809bee..8639d6606f 100644 --- a/plugins/FreeImage/Source/FreeImage/Plugin.cpp +++ b/plugins/FreeImage/Source/FreeImage/Plugin.cpp @@ -256,70 +256,6 @@ FreeImage_Initialise(BOOL load_local_plugins_only) { //s_plugins->AddNode(InitPFM); //s_plugins->AddNode(InitPICT); //s_plugins->AddNode(InitRAW); - - // external plugin initialization - -#ifdef _WIN32 - if (!load_local_plugins_only) { - int count = 0; - char buffer[MAX_PATH + 200]; - char current_dir[2 * _MAX_PATH], module[2 * _MAX_PATH]; - BOOL bOk = FALSE; - - // store the current directory. then set the directory to the application location - - if (GetCurrentDirectory(2 * _MAX_PATH, current_dir) != 0) { - if (GetModuleFileName(NULL, module, 2 * _MAX_PATH) != 0) { - char *last_point = strrchr(module, '\\'); - - if (last_point) { - *last_point = '\0'; - - bOk = SetCurrentDirectory(module); - } - } - } - - // search for plugins - - while (count < s_search_list_size) { - _finddata_t find_data; - long find_handle; - - strcpy(buffer, s_search_list[count]); - strcat(buffer, "*.fip"); - - if ((find_handle = (long)_findfirst(buffer, &find_data)) != -1L) { - do { - strcpy(buffer, s_search_list[count]); - strncat(buffer, find_data.name, MAX_PATH + 200); - - HINSTANCE instance = LoadLibrary(buffer); - - if (instance != NULL) { - FARPROC proc_address = GetProcAddress(instance, "_Init@8"); - - if (proc_address != NULL) { - s_plugins->AddNode((FI_InitProc)proc_address, (void *)instance); - } else { - FreeLibrary(instance); - } - } - } while (_findnext(find_handle, &find_data) != -1L); - - _findclose(find_handle); - } - - count++; - } - - // restore the current directory - - if (bOk) { - SetCurrentDirectory(current_dir); - } - } -#endif // _WIN32 } } } @@ -507,7 +443,7 @@ FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format, cons FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(const char *path, const char *format, const char *description, const char *extension, const char *regexpr) { if (path != NULL) { - HINSTANCE instance = LoadLibrary(path); + HINSTANCE instance = LoadLibraryA(path); if (instance != NULL) { FARPROC proc_address = GetProcAddress(instance, "_Init@8"); -- cgit v1.2.3