Commit db570de3 authored by Luca Bacci's avatar Luca Bacci Committed by Jehan
Browse files

Use SetDllDirectoryW ()

No need to use GetProcAddress (), SetDllDirectory () is available
since XP SP1
parent ed1e4236
......@@ -608,16 +608,7 @@ main (int argc,
#ifdef G_OS_WIN32
/* Reduce risks */
{
typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName);
t_SetDllDirectoryA p_SetDllDirectoryA;
p_SetDllDirectoryA =
(t_SetDllDirectoryA) GetProcAddress (GetModuleHandleW (L"kernel32.dll"),
"SetDllDirectoryA");
if (p_SetDllDirectoryA)
(*p_SetDllDirectoryA) ("");
}
SetDllDirectoryW (L"");
/* On Windows, set DLL search path to $INSTALLDIR/bin so that .exe
plug-ins in the plug-ins directory can find libgimp and file
......
......@@ -196,15 +196,7 @@ gimp_main (GType plug_in_type,
gint i, j, k;
/* Reduce risks */
{
typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName);
t_SetDllDirectoryA p_SetDllDirectoryA;
p_SetDllDirectoryA = (t_SetDllDirectoryA) GetProcAddress (GetModuleHandleW (L"kernel32.dll"),
"SetDllDirectoryA");
if (p_SetDllDirectoryA)
(*p_SetDllDirectoryA) ("");
}
SetDllDirectoryW (L"");
/* On Windows, set DLL search path to $INSTALLDIR/bin so that GEGL
* file operations can find their respective file library DLLs (such
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment