summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-20 18:32:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-20 18:32:23 +0000
commitc9bf0c30a59a922b96713db54e2293fdf7334adf (patch)
treebbb2c6d4ee59db14ecff308d59da7bab5acf284b /plugins
parentcea2cbc276fc337f95ab665bd766c5a467980e4e (diff)
advimg -> Unicode
git-svn-id: http://svn.miranda-ng.org/main/trunk@104 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/FreeImage/FreeImage_10.vcxproj8
-rw-r--r--plugins/FreeImage/Source/FreeImage/Plugin.cpp66
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 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
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");