Codigo que no Entiendo
Publicado por ismael silva (3 intervenciones) el 19/08/2016 22:14:50
Buenas tardes, estoy haciendo una migración de un código de foxpro, hay un estructura de código que no me permite avanzar por que no la entiendo, en el código se asan dos cadenas a un .vcx llamado armsec (padre: armadillo) y llaman a una función INSTALKEY que por mas que trato de leerla y la depuro no la entiendo, no se si esta clase es propia del programador en su momento o algo propio de fox, les dejo el código anexo para ver si me ayudan, mil gracias. Tiene que ver con una autorización de red, eso me dijeron, pro no se :(
Estoy mas pedido que LOST....
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
** Created 11/23/03 09:51:20 AM
** Copyright Avian Management Services 2003
** Checked 27/11/03 DLM - OK
#If .F.
TEXT
********************************
* HELP BUILDER COMMENT BLOCK *
********************************
*:Help Documentation
*:Purpose:
Checks a name/key pair, and (if valid and not already expired) stores it as the new key.
*:Keywords:
InstallKey
*:Parameters:
tcName, tcKey
*:Returns:
Returns non-zero if the code is valid.
*:Remarks:
Note: an expired key is still valid!
You must check the EXPIRED environment variable, or the value returned by
the GetLastError() function, to see if it's expired or not.
*:Example:
_screen.oArmSec.InstallKey('FRED', '12334-5678')
*:EndHelp
ENDTEXT
#Endif
Lparameters tcName,tcKey
Local llRetVal, lnRetVal
Store .T. To llRetVal
If Vartype(tcName) <> 'C'
This.errorhandler('INSTALLKEY','tcName must be type C')
llRetVal = .F.
Endif
If Vartype(tcKey) <> 'C'
This.errorhandler('INSTALLKEY','tcName must be type C')
llRetVal = .F.
Endif
If llRetVal = .T.
lnRetVal = InstallKey(tcName,tcKey)
Endif
If lnRetVal = 0
llRetVal = .F.
Endif
If llRetVal = .F.
This.errorhandler('INSTALLKEY','Unable to Install key. UserName / Key - ' + tcName + ' / ' + tcKey)
This.getlastError('INSTALLKEY')
Endif
Return llRetVal
Estoy mas pedido que LOST....
Valora esta pregunta


0