Func _Mutex($handle, $flag = 0)
Local $ERROR_ALREADY_EXISTS = 183, $dll = DllCall("kernel32.dll", "int", "CreateMutex", "int", 0, "long", 1, "str", StringReplace($handle, "\", "")), $err = DllCall("kernel32.dll", "int", "GetLastError")
If $err[0] = $ERROR_ALREADY_EXISTS and $flag = 0 Then Exit
SetError($err[0])
Return $dll[0]
EndFunc