1 Attribute VB_Name
= "Global"
3 ' "Reseter", Copyright 2006-2007 TodoSV.com
4 ' Licencia adicional a: www.svcommunity.org y www.untercio.net
5 ' Mantenedores principales:
8 ' Para soporte, dudas, consultas, inquitudes y demás:
9 ' http://foro.todosv.com/reseter/
10 ' http://www.svcommunity.org/forum/index.php?topic=25095.0
11 ' http://www.svcommunity.org/forum/index.php?topic=59743.0
12 Private TiempoMax
As Double
26 Direccion
As String 'Dirección a navegar
27 usuario
As String 'Usuario del router
28 clave
As String 'Clave del usuario del router
29 base
As String 'Dirección de la puerta de enlace
30 puerto
As Long 'Puerto de acceso
33 accionTipo
As e_AccionEX
36 codigo
As String 'Lista de codigos a ejecutarse
37 tipoAcceso
As e_Acceso
'Tipo de acceso [Telnet | Web]
38 renovar
As Boolean 'Ejecutar renovación de IP
39 asumirDes
As Boolean 'Asumir desconexion o probar?
41 Public m_Datos
As t_Datos
42 Public flag_Navegar
As Boolean
44 Public TelnetComandos() As String
45 Public nComando
As Integer
46 Public NetError
As Boolean
47 Private Intentos_Realizados
As Byte
48 Public pSocket
As AuroNet
49 Public ppSocket
As AuroNet
50 Public Tiempo
As cTimer
'Uso general
51 Public TiempoEx
As cTimer
'Uso secundario
52 Public TiempoEx2
As New cTimer
'Uso terciario
54 Public dXMR_ok
As Boolean
59 '------------------------
61 On Error GoTo Main_Err
63 Set Tiempo
= New cTimer
64 Set TiempoEx
= New cTimer
65 'Empezamos a medir el tiempo que tarda en iniciar el programa
67 '------------------------
68 'Iniciamos los Sockets
69 Set pSocket
= New AuroNet
70 Set ppSocket
= New AuroNet
71 pSocket
.Direccion
= PaginaIP
72 ppSocket
.Direccion
= "www.google.com"
73 '------------------------
75 '------------------------
76 'Fichero INI con las opciones del programa
77 rINI_OPCIONES
= App
.Path
& "\Reseter.ini"
78 'Fichero INI con los códigos de reseteo para los routers
79 rINI_ROUTERS
= App
.Path
& "\Routers.ini"
80 '------------------------
81 Quieto
= LeerINI("Opciones", "Quieto", False)
82 'Será que es mejor no iniciar el Objeto IE?
83 'Esto es util cuando se ha desinstalado el Explorer o en Wine
84 NoIE
= LeerINI("Opciones", "NoIE", False)
85 ModoLinux
= LeerINI("Opciones", "Linux:Compatibilidad", False)
86 '------------------------
90 '------------------------
91 Registrar
"Iniciando Reseter: " & App
.Major
& "." & App
.Minor
& "." & App
.Revision
& " " & EstadoVer
92 Registrar
"Propiedad de todosv.com, svcommunity.org y untercio.net"
93 Registrar
"Información: http://foro.todosv.com/reseter/"
94 Registrar
"IP pública gracias a " & ObtenerDominio(PaginaIP
)
96 '------------------------
99 Registrar
"+Objeto IE: NoIE establecido."
104 Registrar
"+IP Local: " & pSocket
.IpLocal
105 Registrar
"+IP Gateway: " & EthGateWay
107 Obtener_Lista_Externa
108 frmPrincipal
.ComReset
.Text
= Predefinido
110 '------------------------
111 dXMR
= App
.Path
& "\XMR.exe"
112 dXMR_ok
= (Dir
$(dXMR) = vbNullString
)
113 Registrar
"¿XMR?... " & IIf(dXMR_ok
, "¡Si!", "No...")
114 '------------------------
116 '------------------------
117 Registrar
"Reestableciendo interfaz"
118 frmPrincipal
.chkAvanzado
.Value
= LeerINI("Interfaz", "MAvanzado", Unchecked
)
119 frmPrincipal
.chkTerminal
.Value
= LeerINI("Interfaz", "MTerminal", Unchecked
)
120 frmPrincipal
.txtNumero
.Text
= LeerINI("Opciones", "Telefono", vbNullString
)
122 Umbral_Desconexion
= 30000
124 '------------------------
125 'Verificar si hay router predefinido y proceder
126 '------------------------
127 If HayPredefinido
= True Then
128 Registrar
"Router predefinido, 10segs. para reseteo o cancelar"
129 frmPrincipal
.cmdPredefinir
.Caption
= "Cancelar"
130 frmPrincipal
.cmdReset
.Enabled
= False
131 frmPrincipal
.ComReset
.Enabled
= False
135 'Esperamos los 10segs ó que la persona presione cancelar
136 Do Until TiempoEx
.Elapsed
> 10000 Or NetError
= True
138 frmPrincipal
.lblTW
.Caption
= Fix((10000 - TiempoEx
.Elapsed
) / 1000)
140 If TiempoEx2
.Elapsed
> 1000 Then
149 'Si no presionó cancelar
151 Registrar
"{[PRE]:Iniciando reseteo predefinido}"
153 Registrar
"{[PRE]:Terminando programa}"
157 'Si presionó cancelar
158 Registrar
"Se ha cancelado el reseteo automatico"
164 frmPrincipal
.cmdReset
.Enabled
= True
165 frmPrincipal
.ComReset
.Enabled
= True
167 '------------------------
168 Registrar
"Reseter tardó " & Round(Tiempo
.Elapsed
/ 1000, 2) & "segs. en cargar"
172 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Main"
177 Public Sub Reiniciar()
179 On Error GoTo Reiniciar_Err
182 Dim Detectado
As Boolean
183 'Reseteamos las variables.
186 'Verificamos si existe el objeto IE y verificamos si debe o no
188 If IE Is
Nothing And m_Datos
.tipoAcceso
= web
Then
190 Registrar
"!!!No hay objeto IE porque se especificó NoIE=-1"
192 Registrar
"!!!Por alguna causa el objeto IE no esta!"
196 'Verificamos el tipo de operación [Web | Telnet | AuroNet]
198 Select Case m_Datos
.tipoAcceso
200 Case Is
= e_Acceso
.web
201 Registrar
"+-Será un reseteo via WEB"
204 Case Is
= e_Acceso
.telnet
205 Registrar
"+-Será un reseteo via Telnet"
208 Case Is
= e_Acceso
.auro
209 Registrar
"+-Será un reseteo via WEB/AuroNet"
213 'Si ocurrió algún error en el reinicio
214 If NetError
= True Then
215 Registrar
"!!! Ha ocurrido un error critico y el reseteo no continuará"
219 'Esperamos la reconexión
220 If m_Datos
.asumirDes
Or ModoLinux
Then
221 Registrar
"+--Esperando " & Fix((Umbral_Desconexion
/ 1000)) & "Segs. para asumir des/conexión de router"
226 frmPrincipal
.lblTW
.Caption
= Fix((Umbral_Desconexion
- Tiempo
.Elapsed
) / 1000)
227 Loop Until Tiempo
.Elapsed
> Umbral_Desconexion
Or NetError
Or GetNetConnectString
= False
231 If NetError
Then Exit Sub
233 Registrar
"+--Esperando " & Fix(Umbral_Desconexion
/ 1000) & " segundos para desconexión de router"
238 frmPrincipal
.lblTW
.Caption
= Fix((Umbral_Desconexion
- Tiempo
.Elapsed
) / 1000)
239 Loop Until Tiempo
.Elapsed
> Umbral_Desconexion
Or NetError
Or GetNetConnectString
= False
243 If NetError
Or Tiempo
.Elapsed
> Umbral_Desconexion
Then
244 Registrar
"+---El router nunca se desconectó o ocurrió otro error"
250 Registrar
"+--Esperando " & Fix(Umbral_Desconexion
/ 1000) & "segundos para reconexión de router"
255 frmPrincipal
.lblTW
.Caption
= Fix((Umbral_Desconexion
- Tiempo
.Elapsed
) / 1000)
256 Loop Until Tiempo
.Elapsed
> Umbral_Desconexion
Or NetError
Or GetNetConnectString
= True
260 If NetError
Or Tiempo
.Elapsed
> Umbral_Desconexion
Then
261 Registrar
"+---El router nunca se conectó o ocurrió otro error"
268 'Esperar 5 minutos a que se recupere el internet
269 Registrar
"+--Esperando recuperación de internet (máximo " & (Umbral_EsperarInternetMax
/ 60000) & "minutos)"
272 Dim dTemporizador
As Long
273 dTemporizador
= SetTimer(0, 0, 1000, AddressOf lpActualizar
)
274 Detectado
= HayInternet
276 If Not Detectado
Then
278 Do Until (Tiempo
.Elapsed
> Umbral_EsperarInternetMax
) Or NetError
281 'Chequear si ya hay internet
282 If TiempoEx
.Elapsed
> Umbral_ChequeoInternet
Then
283 Detectado
= HayInternet
285 If Detectado
Then Exit Do
292 KillTimer
0, dTemporizador
296 If Detectado
And NetError
= False Then
297 'Si hay internet entonces verificamos si la IP cambió
298 '1: Si no cambió entonces reseteamos el router de nuevo
299 '2: siempre y cuando no supere cierto limite de reintentos.
302 If bIP
.Cambio
= True Then
303 Registrar
"++La IP no cambió, reintentando reseteo en " & (Umbral_Reintento
/ 1000) & "Segs."
304 Intentos_Realizados
= Intentos_Realizados
+ 1
306 'Como no cambió reintentamos el reseteo
307 If Intentos_Realizados
> Intentos_Maximos
Then
308 'Si ya no nos quedan intentos...
309 Registrar
"++-Se han hecho " & Intentos_Realizados
& " intentos sin exito, deteniendo"
310 Registrar
"+Se han cancelado los reintentos aútomaticos"
313 'Si aún nos quedan intentos...
315 'Esperar 30segs. para reintentar reseteo
316 Registrar
"+Esperando " & Fix(Umbral_Reintento
/ 1000) & " segundos para intento #" & Intentos_Realizados
+ 1
320 frmPrincipal
.lblTW
.Caption
= Fix((Umbral_Desconexion
- Tiempo
.Elapsed
) / 1000)
321 Loop Until Tiempo
.Elapsed
> Umbral_Reintento
Or NetError
330 Registrar
"+El cambió fue satisfactorio"
332 If dXMR_ok
And frmPrincipal
.txtNumero
.Text
<> vbNullString
Then
333 Registrar
"Enviando mensaje de exito a usuario"
334 XMR_Enviar frmPrincipal
.txtNumero
.Text
, "El reseteo fue exitoso, a las " & Now
& " | nueva IP: " & bIP
.IP_Actual
336 Registrar
"No habia numero para notificacion de usuario"
339 frmPrincipal
.lblTW
.Caption
= "Exito"
343 'Si no se detectó para nada el internet
344 Registrar
"+El tiempo de espera se agotó y no se detecto conexión."
345 Registrar
"++El servidor " & PaginaIP
& " puede estar caido."
346 Registrar
"+Se han cancelado los reintentos aútomaticos"
348 frmPrincipal
.lblTW
.Caption
= "Error"
351 ' Reseteamos algunas variables
352 Umbral_Desconexion
= 30000
356 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Reiniciar"
361 Public Function GuardarRegistro() As String
363 On Error GoTo GuardarRegistro_Err
367 Static ocupado
As Boolean
369 If ocupado
Then Exit Function
372 Buffer
= frmPrincipal
.txtSalida
.Text
373 Open App
.Path
& "\" & Day(Now
) & "-" & Month(Now
) & ".txt" For Append Access Write
As #i
375 Print #i
, CStr(Buffer
)
377 GuardarRegistro
= (App
.Path
& "\" & Day(Now
) & "-" & Month(Now
) & ".txt")
382 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.GuardarRegistro"
388 Public Sub Controlar_Error(linea
As Long, _
389 descripcion
As String, _
391 100 Registrar
"¦¦¦""" & descripcion
& """, erl #" & linea
& " - """ & lugar
& """"
397 106 If MsgBox("Ocurrió el error """ & descripcion
& """, en linea #" & linea
& " de """ & lugar
& """" & vbNewLine
& "Por favor notifica de este error al tema especifico de reseter en svcommunity.org ó todosv.com" & vbNewLine
& "Se ha guardado un registro de error en """ & GuardarRegistro
& """ por favor envielo a los creadores" & vbNewLine
& "¿Desea terminar la aplicación?", vbCritical
+ vbYesNo
) = vbYes
Then End
402 Public Sub Predefinir(Valor
As Boolean)
404 On Error GoTo Predefinir_Err
406 EscribirINI
"Opciones", "BPredefinido", CStr(CInt(Valor
))
407 EscribirINI
"Opciones", "Predefinido", frmPrincipal
.ComReset
.Text
411 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Predefinir"
416 Public Function Predefinido() As String
418 On Error GoTo Predefinido_Err
420 Predefinido
= LeerINI("Opciones", "Predefinido", "Escoja su router/modem")
424 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Predefinido"
429 Public Function ObtenerDominio(URL
As String) As String
431 On Error GoTo ObtenerDominio_Err
434 Buffer
= InStr(8, URL
, "/")
436 If Buffer
> 0 Then ObtenerDominio
= Replace
$(Mid$(URL, 1, Buffer
- 1), "http://", vbNullString
) Else ObtenerDominio
= URL
440 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.ObtenerDominio"
445 Public Function HayPredefinido() As Boolean
447 On Error GoTo HayPredefinido_Err
449 HayPredefinido
= LeerINI("Opciones", "BPredefinido", False)
453 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.HayPredefinido"
458 Public Sub XMR_Enviar(Numero
As String, _
460 'Gracias a Olatin por la idea de enviar mensaje con notificaciones!.
462 On Error GoTo XMR_Enviar_Err
464 ShellExecute frmPrincipal
.hWnd
, "", dXMR
& " /x n=" & Numero
& "|m=" & Mensaje
& "|f=Reseter 4.0", "", "", 0
468 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.XMR_Enviar"
473 Public Sub Error_Cel()
475 On Error GoTo Error_Cel_Err
478 If dXMR_ok
And frmPrincipal
.txtNumero
.Text
<> vbNullString
Then
479 Registrar
"Enviando mensaje de error a usuario"
480 XMR_Enviar frmPrincipal
.txtNumero
.Text
, "El reseteo NO fue exitoso, fallo ocurrido en " & Now
486 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Error_Cel"
491 Public Sub Procesar_Codigo()
492 'Primero quebramos el codigo en un array, donde cada elemento contendrá una linea de codigo básico.
494 On Error GoTo Procesar_Codigo_Err
496 Dim A_Codigo() As String
498 Dim cTimeEspera
As New cTimer
499 A_Codigo
= Split(m_Datos
.codigo
, Chr(254))
501 For i
= 0 To UBound(A_Codigo
)
503 'Saltar los comentarios
504 If Left(A_Codigo(i
), 2) = "//" Then Registrar
"PreProcesador: Comentario: '" & Mid$(A_Codigo(i), 3) & "'"
505 'Reemplazar variables
506 A_Codigo(i
) = Replace
$(A_Codigo(i), "$$GATEWAY$$", EthGateWay)
508 '#########################################################################################
510 '#########################################################################################
511 'El codigo dice que tenemos que reiniciar?, bien, "tratemos
"
512 If A_Codigo(i) = "objetivo
.reiniciar
" Then
513 Registrar "PreProcesador
: 'objetivo.reiniciar' ejecutando 'Reiniciar'"
515 Registrar
"PreProcesador: 'objetivo.reiniciar' ejecutado."
518 'El codigo dice que tenemos que ejecutemos el procesador Res_web?
519 If A_Codigo(i
) = "web.procesar" Then
520 Registrar
"PreProcesador: 'web.procesar' ejecutando 'Res_Web'"
522 Registrar
"PreProcesador: 'web.procesar' ejecutado."
525 'El codigo diceque tenemos que esperar X segundos antes de seguir?
526 If InStr(1, A_Codigo(i
), "mi.esperar=") Then
527 TiempoMax
= CDbl(Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)) * 1000
528 Registrar
"PreProcesador: 'mi.esperar' iniciada [" & TiempoMax
& "]"
529 cTimeEspera
.StartTimer
533 Loop Until cTimeEspera
.Elapsed
> TiempoMax
535 Registrar
"PreProcesador: comando 'mi.esperar' concluido"
538 '#########################################################################################
539 '#########################################################################################
540 '#########################################################################################
542 '#########################################################################################
543 'El codigo dice que tenemos que hacer clic en la direccion indicada?
544 If A_Codigo(i
) = "web.accion.clic" Then
545 m_Datos
.accionTipo
= ed_clic
546 Registrar
"PreProcesador: 'web.accion.clic' traducido a 'm_Datos.accionTipo=ed_clic'"
549 'El codigo dice que solo tenemos que navegar la direccion indicada? (codigo JAVA)
550 If A_Codigo(i
) = "web.accion.java" Then
551 m_Datos
.accionTipo
= ed_java
552 Registrar
"PreProcesador: 'web.accion.java' traducido a 'm_Datos.accionTipo=ed_java'"
555 'El codigo dice que solo tenemos que navegar la direccion indicada?
556 If A_Codigo(i
) = "web.accion.navegar" Then
557 m_Datos
.accionTipo
= ed_navegar
558 Registrar
"PreProcesador: 'web.accion.navegar' traducido a 'm_Datos.accionTipo=ed_navegar'"
561 'El codigo dice que tenemos que llenar información en la direccion y posición indicada?
562 If InStr(1, A_Codigo(i
), "web.accion.llenar") Then
563 m_Datos
.accionTipo
= ed_llenar
564 Registrar
"PreProcesador: 'web.accion.llenar' traducido a 'm_Datos.accionTipo=ed_llenar'"
567 'Debemos asumir que el router se desconectará internamente?.
568 If InStr(1, A_Codigo(i
), "objetivo.asumir.desconexion=") Then
569 m_Datos
.asumirDes
= CBool(Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1))
570 Registrar
"PreProcesador: 'objetivo.asumir.desconexion' traducido a 'm_Datos.asumirDes=" & m_Datos
.asumirDes
& "'"
573 'El codigo dice que tenemos que renovar despues de la operación?
574 If InStr(1, A_Codigo(i
), "red.renovar=") Then
575 m_Datos
.renovar
= CBool(Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1))
576 Registrar
"PreProcesador: 'red.renovar' traducido a 'm_Datos.renovar=" & m_Datos
.renovar
& "'"
579 'El codigo dice que no tenemos que navegar en reiniciar.res_web y en web.procesar?
580 If InStr(1, A_Codigo(i
), "web.navegar=") Then
581 flag_Navegar
= CBool(Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1))
582 Registrar
"PreProcesador: 'web.navegar' traducido a 'flag_Navegar=" & flag_Navegar
& "'"
585 'El codigo dice que tenemos que cambiar el limite para asumir desconexion -temporal-?
586 'mi.umbral.desconexion=<TIEMPO EN SEGUNDOS>
587 If InStr(1, A_Codigo(i
), "mi.umbral.desconexion=") Then
588 Umbral_Desconexion
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1) * 1000
589 Registrar
"PreProcesador: 'mi.umbral.desconexion' traducido a 'Umbral_Desconexion=" & Umbral_Desconexion
& "'"
592 '#########################################################################################
593 '#########################################################################################
594 '#########################################################################################
595 ' Ajustes de parametros
596 '#########################################################################################
597 'El codigo dice que tenemos que ajustar las opciones para procesar telnet?
598 'telnet=<COMANDOS SEPARADOS POR ";">
599 If InStr(1, A_Codigo(i
), "telnet.comando=") Then
600 m_Datos
.tipoAcceso
= telnet
601 m_Datos
.accionEX
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
602 Registrar
"PreProcesador: 'telnet' traducido a 'm_Datos.accionEX=" & m_Datos
.accionEX
& "'"
605 'El codigo dice que tenemos que ajustar las opciones para procesar web?
606 If InStr(1, A_Codigo(i
), "web.url=") Then
607 m_Datos
.accionEX
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
608 m_Datos
.tipoAcceso
= web
609 Registrar
"PreProcesador: 'web.url' traducido a 'm_Datos.accionEX=" & m_Datos
.accionEX
& "'"
612 'El codigo nos da datos para EX2
613 If InStr(1, A_Codigo(i
), "web.datos=") Then
614 m_Datos
.accionEX2
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
615 Registrar
"PreProcesador: 'web.datos' traducido a 'm_Datos.accionEX2=" & m_Datos
.accionEX2
& "'"
618 'El codigo especifica el puerto a usar?
619 If InStr(1, A_Codigo(i
), "puerto=") Then
620 m_Datos
.puerto
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
621 Registrar
"PreProcesador: 'puerto' traducido a 'm_Datos.puerto=" & m_Datos
.puerto
& "'"
624 'El codigo especifica el control a usar?
625 If InStr(1, A_Codigo(i
), "web.control=") Then
626 m_Datos
.nCont
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
627 Registrar
"PreProcesador: 'web.control' traducido a 'm_Datos.nCont=" & m_Datos
.nCont
& "'"
630 'El codigo especifica el formulario a usar?
631 If InStr(1, A_Codigo(i
), "web.formulario=") Then
632 m_Datos
.nForm
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
633 Registrar
"PreProcesador: 'web.formulario' traducido a 'm_Datos.nForm=" & m_Datos
.nForm
& "'"
636 'El codigo especifica el usuario a usar?
637 If InStr(1, A_Codigo(i
), "web.usuario=") Then
638 m_Datos
.usuario
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
639 Registrar
"PreProcesador: 'web.usuario' traducido a 'm_Datos.usuario=" & m_Datos
.usuario
& "'"
642 'El codigo especifica la clave a usar?
643 If InStr(1, A_Codigo(i
), "web.clave=") Then
644 m_Datos
.clave
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
645 Registrar
"PreProcesador: 'clave' traducido a 'm_Datos.clave=" & m_Datos
.clave
& "'"
648 'El codigo especifica la dirección base a usar?
649 If InStr(1, A_Codigo(i
), "objetivo.ip=") Then
650 m_Datos
.base
= Mid$(A_Codigo(i), InStr(1, A_Codigo(i
), "=") + 1)
651 Registrar
"PreProcesador: 'base' traducido a 'm_Datos.base=" & m_Datos
.base
& "'"
654 '#########################################################################################
655 '#########################################################################################
661 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Procesar_Codigo"
666 Public Function HayInternet() As Boolean
668 On Error GoTo HayInternet_Err
671 If m_Datos
.renovar
= True Then RenovarLAN
672 Registrar
"+---Chequeando conexión a internet... espere"
675 If ppSocket
.HTML_CONSULTAR
Then
676 Registrar
"+----Chequeo -> Se detectó internet"
679 Registrar
"+----Chequeo -> Aún no hay internet"
686 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.HayInternet"
691 Public Sub Restablecer_Todo()
693 On Error GoTo Restablecer_Todo_Err
696 TelnetComandos
= Split("")
699 Intentos_Realizados
= 0
704 .accionTipo
= ed_clic
720 Restablecer_Todo_Err:
721 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Restablecer_Todo"
726 Public Sub Terminar()
728 On Error GoTo Terminar_Err
731 EscribirINI
"Opciones", "Quieto", CStr(CInt(Quieto
))
732 EscribirINI
"Opciones", "NoIE", CStr(CInt(NoIE
))
733 EscribirINI
"Opciones", "Telefono", CStr(frmPrincipal
.txtNumero
.Text
)
734 EscribirINI
"Opciones", "Linux:Compatibilidad", CStr(CInt(ModoLinux
))
735 Set pSocket
= Nothing
736 Set ppSocket
= Nothing
747 Controlar_Error Erl
, Err
.Description
, "Reseter.Global.Terminar"