Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
f7be0cf6
Commit
f7be0cf6
authored
Dec 30, 2022
by
Luca Bacci
Committed by
Jehan
Jan 24, 2023
Browse files
Use LoadLibraryW ()
parent
c98ffb7e
Changes
8
Hide whitespace changes
Inline
Side-by-side
app/core/gimpbacktrace-windows.c
View file @
f7be0cf6
...
...
@@ -285,7 +285,7 @@ gimp_backtrace_start (void)
HMODULE
hModule
;
DWORD
options
;
hModule
=
LoadLibrary
A
(
"mgwhelp.dll"
);
hModule
=
LoadLibrary
W
(
L
"mgwhelp.dll"
);
#define INIT_PROC(name) \
G_STMT_START \
...
...
modules/gimpinputdevicestore-dx.c
View file @
f7be0cf6
...
...
@@ -216,7 +216,7 @@ gimp_input_device_store_init (GimpInputDeviceStore *store)
return
;
}
if
((
dinput8
=
LoadLibrary
(
"dinput8.dll"
))
==
NULL
)
if
((
dinput8
=
LoadLibrary
W
(
L
"dinput8.dll"
))
==
NULL
)
{
g_set_error_literal
(
&
store
->
error
,
GIMP_MODULE_ERROR
,
GIMP_MODULE_FAILED
,
"Could not load dinput8.dll"
);
...
...
plug-ins/screenshot/screenshot-win32-dwm-api.h
View file @
f7be0cf6
...
...
@@ -61,7 +61,7 @@ LoadRequiredDwmFunctions (void)
{
if
(
dwmApi
)
return
TRUE
;
dwmApi
=
LoadLibrary
(
"dwmapi"
);
dwmApi
=
LoadLibrary
W
(
L
"dwmapi"
);
if
(
!
dwmApi
)
return
FALSE
;
DwmGetWindowAttribute
=
(
DWMGETWINDOWATTRIBUTE
)
GetProcAddress
(
dwmApi
,
"DwmGetWindowAttribute"
);
...
...
plug-ins/screenshot/screenshot-win32-magnification-api.h
View file @
f7be0cf6
...
...
@@ -112,7 +112,7 @@ BOOL LoadMagnificationLibrary(void)
{
if
(
magnificationLibrary
)
return
TRUE
;
magnificationLibrary
=
LoadLibrary
(
"Magnification"
);
magnificationLibrary
=
LoadLibrary
W
(
L
"Magnification"
);
if
(
!
magnificationLibrary
)
return
FALSE
;
MagInitialize
=
(
MAGINITIALIZE
)
GetProcAddress
(
magnificationLibrary
,
"MagInitialize"
);
...
...
plug-ins/screenshot/screenshot-win32.c
View file @
f7be0cf6
...
...
@@ -1207,7 +1207,7 @@ BOOL
InitInstance
(
HINSTANCE
hInstance
,
int
nCmdShow
)
{
HINSTANCE
User32Library
=
LoadLibrary
(
"user32.dll"
);
HINSTANCE
User32Library
=
LoadLibrary
W
(
L
"user32.dll"
);
if
(
User32Library
)
{
...
...
plug-ins/script-fu/libscriptfu/tinyscheme/dynload.c
View file @
f7be0cf6
...
...
@@ -9,6 +9,8 @@
#include
<stdio.h>
#include
<stdlib.h>
#include
<glib/glib.h>
#ifndef MAXPATHLEN
# define MAXPATHLEN 1024
#endif
...
...
@@ -44,8 +46,17 @@ typedef void (*FARPROC)();
}
static
HMODULE
dl_attach
(
const
char
*
module
)
{
HMODULE
dll
=
LoadLibrary
(
module
);
if
(
!
dll
)
display_w32_error_msg
(
module
);
wchar_t
*
module_utf16
=
g_utf8_to_utf16
(
module
,
-
1
,
NULL
,
NULL
,
NULL
);
HMODULE
dll
=
NULL
;
if
(
!
module_utf16
)
return
NULL
;
dll
=
LoadLibraryW
(
module_utf16
);
if
(
!
dll
)
display_w32_error_msg
(
module
);
free
(
module_utf16
);
return
dll
;
}
...
...
plug-ins/twain/tw_platform.h
View file @
f7be0cf6
...
...
@@ -25,6 +25,7 @@
#include
"twain.h"
/* The DLL to be loaded for TWAIN support */
#define TWAIN_DLL_NAME_W L"TWAIN_32.DLL"
#define TWAIN_DLL_NAME "TWAIN_32.DLL"
#define DEBUG_LOGFILE "c:\\twain.log"
#define DUMP_FILE "C:\\TWAINCAP.BIN"
...
...
plug-ins/twain/tw_win.c
View file @
f7be0cf6
...
...
@@ -92,7 +92,7 @@ twainIsAvailable(void)
}
/* Attempt to load the library */
hDLL
=
LoadLibrary
(
TWAIN_DLL_NAME
);
hDLL
=
LoadLibrary
W
(
TWAIN_DLL_NAME
_W
);
if
(
hDLL
==
NULL
)
return
FALSE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment