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
689201e8
Commit
689201e8
authored
Dec 31, 2022
by
Luca Bacci
Committed by
Jehan
Jan 24, 2023
Browse files
Use OpenFileMappingW ()
parent
2db0bf19
Changes
1
Hide whitespace changes
Inline
Side-by-side
libgimp/gimp-shm.c
View file @
689201e8
...
...
@@ -107,14 +107,21 @@ _gimp_shm_open (gint shm_ID)
/* Use Win32 shared memory mechanisms for transferring tile data. */
gchar
fileMapName
[
128
];
gchar
fileMapName
[
128
];
wchar_t
*
w_fileMapName
;
/* From the id, derive the file map name */
g_snprintf
(
fileMapName
,
sizeof
(
fileMapName
),
"GIMP%d.SHM"
,
_shm_ID
);
w_fileMapName
=
g_utf8_to_utf16
(
fileMapName
,
-
1
,
NULL
,
NULL
,
NULL
);
if
(
!
w_fileMapName
)
g_error
(
"Cannot convert to UTF16"
);
/* Open the file mapping */
_shm_handle
=
OpenFileMapping
(
FILE_MAP_ALL_ACCESS
,
0
,
fileMapName
);
_shm_handle
=
OpenFileMappingW
(
FILE_MAP_ALL_ACCESS
,
0
,
w_fileMapName
);
g_clear_pointer
(
&
w_fileMapName
,
g_free
);
if
(
_shm_handle
)
{
/* Map the shared memory into our address space for use */
...
...
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