From 86de45ec61b003227525620cf48a496e18a3ebb1 Mon Sep 17 00:00:00 2001 From: Alexis Caraballo Date: Wed, 14 Jul 2021 21:02:48 -0300 Subject: [PATCH] Activo el anti doble cliente --- CODIGO/General.bas | 12 ++++++------ CODIGO/PrevInstance.bas | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CODIGO/General.bas b/CODIGO/General.bas index a80cd5c4..02550e76 100644 --- a/CODIGO/General.bas +++ b/CODIGO/General.bas @@ -1031,14 +1031,14 @@ Sub Main() #If DEBUGGING = 0 Then - 'If Not RunningInVB Then + If Not RunningInVB Then - ' If FindPreviousInstance Then - ' Call MsgBox("¡Argentum Online ya esta corriendo! No es posible correr otra instancia del juego. Haga clic en Aceptar para salir.", vbApplicationModal + vbInformation + vbOKOnly, "Error al ejecutar") - ' End - 'End If + If FindPreviousInstance Then + Call MsgBox("¡Argentum Online ya esta corriendo! No es posible correr otra instancia del juego. Haga clic en Aceptar para salir.", vbApplicationModal + vbInformation + vbOKOnly, "Error al ejecutar") + End + End If - 'End If + End If #End If diff --git a/CODIGO/PrevInstance.bas b/CODIGO/PrevInstance.bas index 1b32003f..58642ed9 100644 --- a/CODIGO/PrevInstance.bas +++ b/CODIGO/PrevInstance.bas @@ -55,7 +55,7 @@ Private Function CreateNamedMutex(ByRef mutexName As String) As Boolean Exit Function CreateNamedMutex_Err: - Call RegistrarError(Err.number, Err.Description, "PrevInstance.CreateNamedMutex", Erl) + Call RegistrarError(Err.Number, Err.Description, "PrevInstance.CreateNamedMutex", Erl) Resume Next End Function @@ -74,7 +74,7 @@ Public Function FindPreviousInstance() As Boolean ' '*************************************************** 'We try to create a mutex, the name could be anything, but must contain no backslashes. - If CreateNamedMutex("UniqueNameThatActuallyCouldBeAnything") Then + If CreateNamedMutex("EnVezDeChitearAyudanos!HablanosAlDiscord") Then 'There's no other instance running FindPreviousInstance = False Else @@ -87,7 +87,7 @@ Public Function FindPreviousInstance() As Boolean Exit Function FindPreviousInstance_Err: - Call RegistrarError(Err.number, Err.Description, "PrevInstance.FindPreviousInstance", Erl) + Call RegistrarError(Err.Number, Err.Description, "PrevInstance.FindPreviousInstance", Erl) Resume Next End Function @@ -111,7 +111,7 @@ Public Sub ReleaseInstance() Exit Sub ReleaseInstance_Err: - Call RegistrarError(Err.number, Err.Description, "PrevInstance.ReleaseInstance", Erl) + Call RegistrarError(Err.Number, Err.Description, "PrevInstance.ReleaseInstance", Erl) Resume Next End Sub