Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2db497e8
Commit
2db497e8
authored
Feb 23, 2010
by
Andrey Turkin
Committed by
Alexandre Julliard
Feb 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use TEB-based buffer in CreateMutexExA.
parent
240afab3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
sync.c
dlls/kernel32/sync.c
+6
-3
No files found.
dlls/kernel32/sync.c
View file @
2db497e8
...
...
@@ -614,16 +614,19 @@ HANDLE WINAPI CreateMutexW( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCWSTR name )
*/
HANDLE
WINAPI
CreateMutexExA
(
SECURITY_ATTRIBUTES
*
sa
,
LPCSTR
name
,
DWORD
flags
,
DWORD
access
)
{
WCHAR
buffer
[
MAX_PATH
];
ANSI_STRING
nameA
;
NTSTATUS
status
;
if
(
!
name
)
return
CreateMutexExW
(
sa
,
NULL
,
flags
,
access
);
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
buffer
,
MAX_PATH
))
RtlInitAnsiString
(
&
nameA
,
name
);
status
=
RtlAnsiStringToUnicodeString
(
&
NtCurrentTeb
()
->
StaticUnicodeString
,
&
nameA
,
FALSE
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
}
return
CreateMutexExW
(
sa
,
b
uffer
,
flags
,
access
);
return
CreateMutexExW
(
sa
,
NtCurrentTeb
()
->
StaticUnicodeString
.
B
uffer
,
flags
,
access
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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