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
e9793cc1
Commit
e9793cc1
authored
May 21, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Mutex names are case sensitive.
parent
36a7f317
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
sync.c
dlls/kernel32/sync.c
+2
-3
sync.c
dlls/kernel32/tests/sync.c
+23
-0
No files found.
dlls/kernel32/sync.c
View file @
e9793cc1
...
...
@@ -669,8 +669,7 @@ HANDLE WINAPI CreateMutexW( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCWSTR name )
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
Attributes
=
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
name
)
...
...
@@ -722,7 +721,7 @@ HANDLE WINAPI OpenMutexW( DWORD access, BOOL inherit, LPCWSTR name )
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
(
inherit
?
OBJ_INHERIT
:
0
)
;
attr
.
Attributes
=
inherit
?
OBJ_INHERIT
:
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
name
)
...
...
dlls/kernel32/tests/sync.c
View file @
e9793cc1
...
...
@@ -148,7 +148,30 @@ static void test_mutex(void)
todo_wine
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_NOT_OWNER
),
"ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %d
\n
"
,
GetLastError
());
/* test case sensitivity */
SetLastError
(
0xdeadbeef
);
hOpened
=
OpenMutex
(
READ_CONTROL
,
FALSE
,
"WINETESTMUTEX"
);
ok
(
!
hOpened
,
"OpenMutex succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
hOpened
=
OpenMutex
(
READ_CONTROL
,
FALSE
,
"winetestmutex"
);
ok
(
!
hOpened
,
"OpenMutex succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
hOpened
=
CreateMutex
(
NULL
,
FALSE
,
"WineTestMutex"
);
ok
(
hOpened
!=
NULL
,
"CreateMutex failed with error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
hOpened
);
SetLastError
(
0xdeadbeef
);
hOpened
=
CreateMutex
(
NULL
,
FALSE
,
"WINETESTMUTEX"
);
ok
(
hOpened
!=
NULL
,
"CreateMutex failed with error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0
,
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
hOpened
);
CloseHandle
(
hCreated
);
}
...
...
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