--- a/Win32OperatingSystem.st Mon Jul 21 13:49:49 2008 +0200
+++ b/Win32OperatingSystem.st Mon Jul 21 14:12:26 2008 +0200
@@ -6421,7 +6421,7 @@
|handle|
- handle := self primCreateMutex:nil initialOwner: true name: name.
+ handle := self primCreateMutex:nil initialOwner: false name: name.
"/ lastErrorCode := self primGetLastError.
"/ lastErrorCode == 5 "ERROR_ACCESS_DENIED" ifTrue:[Transcript showCR: 'Mutex not accesible (GetLastError = ERROR_ACCESS_DENIED)'.].
"/ lastErrorCode == 183 "ERROR_ALREADY_EXISTS" ifTrue:[Transcript showCR: 'Mutex already exists (GetLastError = ERROR_ALREADY_EXISTS)'.].
@@ -6441,7 +6441,8 @@
|handle lastErrorCode|
- handle := self primCreateMutex:nil initialOwner: true name: name.
+ handle := self createMutexNamed: name.
+ handle isNil ifTrue:[^ true]. "If mutex creation fails, assume it already exists"
lastErrorCode := self primGetLastError.
^ lastErrorCode == 5 "ERROR_ACCESS_DENIED" or:[
lastErrorCode == 183 "ERROR_ALREADY_EXISTS"]
@@ -15569,7 +15570,7 @@
!Win32OperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.334 2008-07-21 11:49:49 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.335 2008-07-21 12:12:26 fm Exp $'
! !
Win32OperatingSystem initialize!