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
7b9e9ef7
Commit
7b9e9ef7
authored
Dec 30, 2022
by
Luca Bacci
Committed by
Jehan
Jan 24, 2023
Browse files
Use CreateFileMappingW ()
parent
3f0ddcb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/plug-in/gimppluginshm.c
View file @
7b9e9ef7
...
...
@@ -133,8 +133,9 @@ gimp_plug_in_shm_new (void)
/* Use Win32 shared memory mechanisms for transferring tile data. */
{
gint
pid
;
gchar
fileMapName
[
MAX_PATH
];
gint
pid
;
gchar
fileMapName
[
MAX_PATH
];
wchar_t
*
w_fileMapName
=
NULL
;
/* Our shared memory id will be our process ID */
pid
=
GetCurrentProcessId
();
...
...
@@ -142,11 +143,16 @@ gimp_plug_in_shm_new (void)
/* From the id, derive the file map name */
g_snprintf
(
fileMapName
,
sizeof
(
fileMapName
),
"GIMP%d.SHM"
,
pid
);
w_fileMapName
=
g_utf8_to_utf16
(
fileMapName
,
-
1
,
NULL
,
NULL
,
NULL
);
/* Create the file mapping into paging space */
shm
->
shm_handle
=
CreateFileMapping
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
0
,
TILE_MAP_SIZE
,
fileMapName
);
shm
->
shm_handle
=
CreateFileMappingW
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
0
,
TILE_MAP_SIZE
,
w_fileMapName
);
g_free
(
w_fileMapName
);
w_fileMapName
=
NULL
;
if
(
shm
->
shm_handle
)
{
...
...
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