Estoy usando un xbrowse en un dialogo modal para mostrar un array que genero desde "C" y actualizar
los datos con un boton "Cargar".
Cuando hago click al boton "Cargar" me trae los datos y los muestra, pero cuando hago click en "Salir" o en el Boton "Cargar" nuevamente, me genera un GPF.
Dejo aqui los archivos error.log y hb_out.log y el codigo PRG que uso, tambien dejo la funcion que crea el array desde "C".
Archivo error.log
- Code: Select all Expand view RUN
Application
===========
Path and name: E:\Biometrico\WinFS84.exe (32 bits)
Size: 6,490,112 bytes
Compiler version: Harbour 3.2.0dev (r2104281802)
FiveWin version: FWH 23.07
C compiler version: Borland/Embarcadero C++ 7.6 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200
Time from start: 0 hours 0 mins 9 secs
Error occurred at: 29/02/2024, 17:55:07
Error description: Error BASE/1004 No existe el m‚todo: LREADONLY
Args:
[ 1] = U
Stack Calls
===========
Called from: => LREADONLY( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:VALUE( 13576 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBRWCOLUMN( 12914 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:CEDITPICTURE( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:ADJUST( 13291 )
Called from: E:\Proyectos\Lib\harbour\Source\prg\class_extensions.prg => TXBROWSE:ADJUST( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SETARRAY( 6348 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\tfutronic.prg => GETUSUARIOS_FS84( 501 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\tfutronic.prg => (b)TFUTRONIC_DLGLISTAUSER( 354 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 792 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1083 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1847 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2135 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3693 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 307 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\tfutronic.prg => TFUTRONIC:DLGLISTAUSER( 383 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\testfs84.prg => (b)TFAMTEST_TESTFAM_FS84( 156 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 792 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1083 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1847 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2135 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3693 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 307 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\testfs84.prg => TFAMTEST:TESTFAM_FS84( 190 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\testfs84.prg => TFAMTEST:NEW( 58 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\taplication.prg => TAPLICATION:TESTFAMFUTRONIC( 628 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\mainfgr.prg => (b)CREATEBUTTONBAR( 287 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 792 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1083 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1847 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2135 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3693 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1118 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\mainfgr.prg => BUTTONBARMAIN( 172 )
Called from: E:\Proyectos\Software\Futronic_FS84\source\prg\mainfgr.prg => MAIN( 135 )
System
======
CPU type: Intel(R) Core(TM) i5-7440HQ CPU @ 2.80GHz 2808 Mhz
Hardware memory: 16266 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 6
1 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22000.120_none_e541a94
2 , E:\Biometrico\FTRAPI.DLL
3 , E:\Biometrico\WinFS84.exe
4 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL
5 DPM,
6 GDI+ Window (WinFS84.exe), C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22000.2003_none_93fcfb98d9f105
Variables in use
================
Procedure Type Value
==========================
LREADONLY
Param 1: O Class: ERROR
TXBRWCOLUMN:VALUE
Local 1: U
Local 2: U
(b)TXBRWCOLUMN
Local 1: U
Local 2: U
Local 3: N 1
TXBRWCOLUMN:CEDITPICTURE
Param 1: O Class: TXBRWCOLUMN
Local 1: S @XEVAL()
Local 2: U
Local 3: B {|| ... }
TXBRWCOLUMN:ADJUST
TXBROWSE:ADJUST
Local 1: O Class: TXBRWCOLUMN
Local 2: U
Local 3: U
Local 4: U
Local 5: U
TXBROWSE:SETARRAY
Local 1: O Class: TXBROWSE
Local 2: N 5
Local 3: N 7
Local 4: N 0
Local 5: U
Local 6: U
Local 7: U
Local 8: U
GETUSUARIOS_FS84
Param 1: A Len: 2
Local 1: L .F.
Local 2: U
Local 3: U
Local 4: U
Local 5: O Class: TXBROWSE
Local 6: U
Local 7: C "0"
Local 8: U
Local 9: U
Local 10: L .F.
Local 11: U
Local 12: U
Local 13: U
Local 14: U
Local 15: U
Local 16: U
Local 17: L .T.
(b)TFUTRONIC_DLGLISTAUSER
Param 1: A Len: 2
Param 2: O Class: TXBROWSE
Local 1: N 3
Local 2: N 2
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 8
Param 2: N 39
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 524327
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 524327
DIALOGBOX
Param 1: N 524327
Param 2: N 514
Param 3: N 0
Param 4: N 524327
Param 5: N 54
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 4194304
Param 2: C "LISTA_USERS"
Param 3: N 921024
Param 4: O Class: TDIALOG
TFUTRONIC:DLGLISTAUSER
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: B {|| ... }
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: L .F.
Param 13: O Class: TDIALOG
Param 14: U
Local 1: N 921024
Local 2: S @_NRESULT()
Local 3: O Class: TDIALOG
(b)TFAMTEST_TESTFAM_FS84
Local 1: L .F.
Local 2: O Class: TDIALOG
Local 3: O Class: TXBROWSE
Local 4: O Class: TFONT
Local 5: A Len: 7
Local 6: O Class: TSAY
Local 7: A Len: 2
Local 8: A Len: 3
Local 9: L .F.
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 15
Param 2: N 45
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 983085
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 983085
DIALOGBOX
Param 1: N 983085
Param 2: N 514
Param 3: N 0
Param 4: N 983085
Param 5: N 31
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 4194304
Param 2: C "PRUEBAS_FS84"
Param 3: N 2362664
Param 4: O Class: TDIALOG
TFAMTEST:TESTFAM_FS84
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: B {|| ... }
Param 6: L .T.
Param 7: B {|| ... }
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: L .F.
Param 13: O Class: TDIALOG
Param 14: U
Local 1: N 2362664
Local 2: S @_NRESULT()
Local 3: O Class: TDIALOG
TFAMTEST:NEW
Local 1: O Class: TDIALOG
Local 2: O Class: TFAMTEST
Local 3: A Len: 16
Local 4: L .F.
TAPLICATION:TESTFAMFUTRONIC
Local 1: O Class: TFAMTEST
(b)CREATEBUTTONBAR
Local 1: S @_OFINGER()
Local 2: O Class: TAPLICATION
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 55
Param 2: N 60
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S @CLICK()
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 3604540
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 3604540
WINRUN
Param 1: N 3604540
Param 2: N 514
Param 3: N 0
Param 4: N 3604540
Param 5: N 15
Local 1: O Class: TBTNBMP
TWINDOW:ACTIVATE
Param 1: N 2362664
BUTTONBARMAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: B {|| ... }
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: U
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
MAIN
Param 1: O Class: TAPLICATION
Local 1: O Class: TFONT
Local 2: U
Local 3: A Len: 14
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TDOLPHINQRY
5 TWINDOW
6 TCONTROL
7 TXBROWSE
8 TXBRWCOLUMN
9 TCOMBOBOX
10 TMULTIGET
11 TGET
12 TAPLICATION
13 TINI
14 TMYSQLSERVER
15 TBRUSH
16 TDIALOG
17 TFONT
18 TREG32
19 TRECT
20 TDOLPHINSRV
21 TUSUARIOS
22 TICON
23 TMSGBAR
24 TMSGITEM
25 TTIMER
26 TBAR
27 TBTNBMP
28 TXIMAGE
29 TCLIPBOARD
30 TFAMTEST
31 TFUTRONIC
32 TSAY
33 TSCROLLBAR
34 TSTRUCT
Memory Analysis
===============
889 Static variables
Dynamic memory consume:
Actual Value: 2490368 bytes
Highest Value: 2490368 bytes
Archivo hb_out.log
- Code: Select all Expand view RUN
Application Internal Error - E:\Biometrico\WinFS84.exe
Terminated at: 2024-02-29 16:42:20
Error irrecuperable 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:005AC747
EAX:0562ADFC EBX:00060000 ECX:03DB035C EDX:00983148
ESI:0562ADFC EDI:00983150 EBP:0019E56C
CS:EIP:0023:005AC747 SS:ESP:002B:0019E568
DS:002B ES:002B FS:0053 GS:002B
Flags:00210202
Exception Parameters: 00000001 00060004
CS:EIP: 89 4B 04 3B 02 75 0C 8B CB 89 0A 3B C1 75 04 33
SS:ESP: 01255AE4 0019E588 005ACCE1 00983148 0562ADFC 00750CD5 00000000 009ECB3C 0019E5AC 005ACE39 00000001 00594FF4 0000008D 00000000 01255FAC 00000000
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
005AC747 0019E56C 0019E588 005ACCE1 00983148 0562ADFC 00750CD5 00000000 009ECB3C
005ACCE1 0019E588 0019E5AC 005ACE39 00000001 00594FF4 0000008D 00000000 01255FAC 00000000 00000000
005ACE39 0019E5AC 0019E6C0 0058ED7B 00000000 006A4935 00000000 006A4670 002F0B68 0019E5F4 767C7CD2 002F0B68
0058ED7B 0019E6C0 0019E6D0 004C6260 00750C52 0074D284
004C6260 0019E6D0 0019E6F0 005951B1 009ECB3C 0000008A 00000000 01255FAC 019B0010 00000301
005951B1 0019E6F0 0019E804 0058EEBC 00000000 009ECB3C FFFFFFFE 01254814 00000000 00000215 00000000 0019E728
0058EEBC 0019E804 0019E83C 0059536D 006A4927 006A3F40 0071D27F 00000000 00719360 005951B1 009ECB3C 00000088
0059536D 0019E83C 0019E950 0058EEBC 00000001 0071DDD4 00000000 00719D50 002F0B68 80006010 01201348 00000000
0058EEBC 0019E950 0019E960 004C3A00 0071D224 00718F60
004C3A00 0019E960 0019E980 005951B1 009ECB3C 00000080 00000000 02A37D2C 0247001B 00000318
005951B1 0019E980 0019EA94 0058EEBC 00000000 0073820B 00000000 00733638 0019E9AC 02ADB2B4 03E05BDC 03E05BDC
0058EEBC 0019EA94 0019EAA4 004C3AD8 0071DB62 00718F60
004C3AD8 0019EAA4 0019EAC4 005951B1 009ECB3C 0000007A 00000000 02A37D2C 0130001B 0000043B
005951B1 0019EAC4 0019EBD8 0058EEBC 00000003 007204E7 00000000 0071A9B0 0019EB30 02A4EA04 03E05BDC 03E05BDC
0058EEBC 0019EBD8 0019EBE8 004C51DC 00738038 00732958
004C51DC 0019EBE8 0019EC08 005951B1 009ECB3C 00000075 00000000 02A37D2C 01240006 00000737
005951B1 0019EC08 0019ED1C 0058EEBC 00000003 00911C79 00000000 009081BC 0019EC74 009ECB4C 00000002 056101EC
0058EEBC 0019ED1C 0019ED2C 004C3CB8 0072043E 00718F60
004C3CB8 0019ED2C 0019ED4C 005951B1 009ECB3C 0000006D 00000000 02A37D2C 0124001B 00000857
005951B1 0019ED4C 0019EE60 0058EEBC 00000003 00000000 00140083 009081AC 766FF858 00C04680 00000020 0019EDB0
Modules:
00400000 00643000 E:\Biometrico\WinFS84.exe
77C40000 001AA000 C:\WINDOWS\SYSTEM32\ntdll.dll
76330000 000F0000 C:\WINDOWS\System32\KERNEL32.DLL
75A10000 00261000 C:\WINDOWS\System32\KERNELBASE.dll
6E4E0000 000A2000 C:\WINDOWS\SYSTEM32\apphelp.dll
75EA0000 0007C000 C:\WINDOWS\System32\ADVAPI32.DLL
76BE0000 000C2000 C:\WINDOWS\System32\msvcrt.dll
75990000 0007A000 C:\WINDOWS\System32\sechost.dll
10000000 00026000 E:\Biometrico\FTRAPI.DLL
56CF0000 003BF000 E:\Biometrico\LIBMYSQL.DLL
56640000 006A5000 E:\Biometrico\FTRSCANAPI.DLL
76070000 000BC000 C:\WINDOWS\System32\RPCRT4.dll
75CE0000 000BF000 C:\WINDOWS\System32\COMDLG32.DLL
76780000 001AC000 C:\WINDOWS\System32\USER32.dll
769F0000 00112000 C:\WINDOWS\System32\ucrtbase.dll
77340000 0028A000 C:\WINDOWS\System32\combase.dll
761C0000 0001A000 C:\WINDOWS\System32\win32u.dll
766B0000 00023000 C:\WINDOWS\System32\GDI32.dll
76420000 00064000 C:\WINDOWS\System32\WS2_32.dll
76B10000 000C1000 C:\WINDOWS\System32\shcore.dll
77250000 000E9000 C:\WINDOWS\System32\gdi32full.dll
764C0000 0007B000 C:\WINDOWS\System32\msvcp_win.dll
76E10000 00440000 C:\WINDOWS\System32\SETUPAPI.dll
769A0000 0004A000 C:\WINDOWS\System32\SHLWAPI.dll
70A20000 00019000 C:\WINDOWS\SYSTEM32\MPR.DLL
775F0000 00616000 C:\WINDOWS\System32\SHELL32.dll
75830000 00008000 C:\WINDOWS\SYSTEM32\VERSION.DLL
70180000 00079000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
5EE60000 00090000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.22000.2003_none_127786c22a430968\COMCTL32.DLL
75F20000 0014E000 C:\WINDOWS\System32\OLE32.DLL
766E0000 0009C000 C:\WINDOWS\System32\OLEAUT32.DLL
71320000 00006000 C:\WINDOWS\SYSTEM32\SHFOLDER.DLL
75860000 00031000 C:\WINDOWS\SYSTEM32\WINMM.DLL
70280000 0016B000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22000.2003_none_93fcfb98d9f1057f\GDIPLUS.DLL
6D580000 0002E000 C:\WINDOWS\SYSTEM32\OLEDLG.DLL
73010000 00024000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
70200000 00006000 C:\WINDOWS\SYSTEM32\MSIMG32.DLL
76490000 00025000 C:\WINDOWS\System32\IMM32.DLL
6E8C0000 00082000 C:\WINDOWS\system32\uxtheme.dll
761F0000 000DA000 C:\WINDOWS\System32\MSCTF.dll
75840000 00012000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
76D10000 00064000 C:\WINDOWS\System32\bcryptPrimitives.dll
6BB50000 000E2000 C:\WINDOWS\SYSTEM32\textinputframework.dll
6A0C0000 000CB000 C:\WINDOWS\SYSTEM32\CoreMessaging.dll
69E20000 00293000 C:\WINDOWS\SYSTEM32\CoreUIComponents.dll
747B0000 000EB000 C:\WINDOWS\SYSTEM32\wintypes.dll
708D0000 0000B000 C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL
70010000 00012000 C:\WINDOWS\system32\napinsp.dll
6FFF0000 00016000 C:\WINDOWS\system32\pnrpnsp.dll
70750000 00050000 C:\WINDOWS\System32\mswsock.dll
70630000 000AF000 C:\WINDOWS\SYSTEM32\DNSAPI.dll
77C10000 00007000 C:\WINDOWS\System32\NSI.dll
6FFE0000 0000E000 C:\WINDOWS\System32\winrnr.dll
6FFC0000 00011000 C:\WINDOWS\system32\wshbth.dll
6FFA0000 00019000 C:\WINDOWS\system32\nlansp_c.dll
6FF30000 00008000 C:\Windows\System32\rasadhlp.dll
6AFC0000 00096000 C:\WINDOWS\SYSTEM32\TextShaping.dll
6DD60000 00160000 C:\WINDOWS\SYSTEM32\WindowsCodecs.dll
70400000 00223000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22000.120_none_e541a94fcce8ed6d\comctl32.DLL
Called from HB_GCALL(0)
Called from TDIALOG:END(769) in .\source\classes\DIALOG.PRG
Called from (b)TFUTRONIC_DLGLISTAUSER(370) in E:\Proyectos\Software\Futronic_FS84\source\prg\tfutronic.prg
Called from TBTNBMP:CLICK(792) in .\source\classes\BTNBMP.PRG
Called from TBTNBMP:LBUTTONUP(1083) in .\source\classes\BTNBMP.PRG
Called from TCONTROL:HANDLEEVENT(1847) in .\source\classes\CONTROL.PRG
Called from TBTNBMP:HANDLEEVENT(2135) in .\source\classes\BTNBMP.PRG
Called from _FWH(3693) in .\source\classes\WINDOW.PRG
Called from DIALOGBOX(0)
Called from TDIALOG:ACTIVATE(307) in .\source\classes\DIALOG.PRG
Called from TFAMTEST:TESTFAM_FS84(190) in E:\Proyectos\Software\Futronic_FS84\source\prg\testfs84.prg
Called from TFAMTEST:NEW(58) in E:\Proyectos\Software\Futronic_FS84\source\prg\testfs84.prg
Called from TAPLICATION:TESTFAMFUTRONIC(628) in E:\Proyectos\Software\Futronic_FS84\source\prg\taplication.prg
Called from (b)CREATEBUTTONBAR(287) in E:\Proyectos\Software\Futronic_FS84\source\prg\mainfgr.prg
Called from TBTNBMP:CLICK(792) in .\source\classes\BTNBMP.PRG
Called from TBTNBMP:LBUTTONUP(1083) in .\source\classes\BTNBMP.PRG
Called from TCONTROL:HANDLEEVENT(1847) in .\source\classes\CONTROL.PRG
Called from TBTNBMP:HANDLEEVENT(2135) in .\source\classes\BTNBMP.PRG
Called from _FWH(3693) in .\source\classes\WINDOW.PRG
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(1118) in .\source\classes\WINDOW.PRG
Called from BUTTONBARMAIN(172) in E:\Proyectos\Software\Futronic_FS84\source\prg\mainfgr.prg
Called from MAIN(135) in E:\Proyectos\Software\Futronic_FS84\source\prg\mainfgr.prg
------------------------------------------------------------------------
Application Internal Error - E:\Biometrico\WinFS84.exe
Terminated at: 2024-02-29 17:55:09
Error irrecuperable 9001: Fallo en recuperaci¢n de error
------------------------------------------------------------------------
Codigo prg y C :
- Code: Select all Expand view RUN
METHOD DlgListaUser( lDelete ) CLASS TFutronic
Local oDlg, oWnd
Local oBrw, oFont
Local aCols
Local oSay
Local aArray := {}
Local oBtn := Array(3)
Local lExit := .F.
DEFAULT lDelete := FALSE
aCols := {;
{ 1, "Group", Nil, 45, AL_RIGHT },;
{ 2, "User ID", Nil, 60, AL_RIGHT },;
{ 3, "Name User", Nil, 300, AL_LEFT },;
{ 4, "Finger ID", Nil, 60, AL_RIGHT },;
{ 5, "User Type", Nil, 80, AL_RIGHT },;
{ 6, "Status", Nil, 80, AL_RIGHT },;
{ 7, "Sec.Level", Nil, 40, AL_RIGHT };
}
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12 BOLD
DEFINE DIALOG oDlg RESOURCE "LISTA_USERS";
TITLE "BIOMETRICO LISTA DE USUARIOS";
ICON "ICONFINGER" FONT oFont
REDEFINE XBROWSE oBrw LINES ID 200 OF oDlg;
DATASOURCE aArray;
COLUMNS aCols
WITH OBJECT oBrw
:MyConfig()
END
REDEFINE SAY oSay ID 100 OF oDlg PROMPT ""
REDEFINE BTNBMP oBtn[1] ID 300 OF oDlg;
2007;
CENTER;
NOROUND;
PROMPT "Eliminar";
ACTION DeleteUser( oBrw, @lExit, oDlg );
GRADIENT BtnGradGreen();
WHEN lDelete
REDEFINE BTNBMP oBtn[2] ID 301 OF oDlg;
2007;
CENTER;
NOROUND;
PROMPT "Cargar";
GRADIENT BtnGradGreen()
oBtn[2]:bAction = <||
oSay:SetText("Leyendo del Biometrico, Espere ...!!" )
cursorwait()
aArray := Fam_ArrayUsers() // Carga Usuarios desde FS84
if ValType(aArray) <> "U" .and. Len(aArray) > 0
oSay:SetText("Total Usuarios = " + Str(Len(aArray),6) )
GetUsuarios_FS84( aArray, oBrw )
else
oSay:SetText("No se Encontraron Usuarios !" )
endif
Return Nil
>
REDEFINE BTNBMP oBtn[3] ID 302 OF oDlg;
2007;
CENTER;
NOROUND;
PROMPT "Salir";
GRADIENT BtnGradRed()
oBtn[3]:bAction = <||
lExit := .T.
oDlg:End()
SysRefresh()
hb_gcAll(.T.)
Return Nil
>
oDlg:bInit = <||
DisablesysmenuDlg(oDlg)
oSay:SetText("Haga Click en Boton Cargar, para la lista de Usuarios !!!")
Return Nil
>
ACTIVATE DIALOG oDlg;
VALID lExit;
CENTER
RELEASE FONT oFont
Return Nil
static function GetUsuarios_FS84( aArray, oBrw )
Local i
Local nLen := Len(aArray)
for i:=1 TO nLen
aArray[i,3] := GetName_IDEmpleado( aArray[i,2] ) // Agrega Nombre al Array
next i
oBrw:SetArray( aArray )
oBrw:SetFocus()
Return Nil
//---------------------------------------------------
HB_FUNC( FAM_ARRAYUSERS )
{
PHB_ITEM pArray = hb_itemArrayNew( 0 );
PHB_ITEM itemRow = hb_itemNew( NULL );
CFamUserList userList;
if( userList.GetListDatabase() )
{
UINT i;
UINT m_nLength = userList.GetLenDatabase();
UINT nTotalUser = m_nLength / 12;
userList.GetArrayDatabase();
for( i=0; i<nTotalUser; i++ )
{
hb_arrayNew( itemRow, 7 );
hb_arraySetC ( itemRow, 1, userList.m_ArrayUsers[i].GroupID );
hb_arraySetC ( itemRow, 2, userList.m_ArrayUsers[i].UserID );
hb_arraySetC ( itemRow, 3, " " );
hb_arraySetC ( itemRow, 4, userList.m_ArrayUsers[i].FingerID );
hb_arraySetC ( itemRow, 5, userList.m_ArrayUsers[i].UserType );
hb_arraySetC ( itemRow, 6, userList.m_ArrayUsers[i].Status );
hb_arraySetC ( itemRow, 7, userList.m_ArrayUsers[i].SL );
hb_arrayAddForward( pArray, itemRow );
}
if ( userList.m_ArrayUsers )
hb_xfree( userList.m_ArrayUsers );
}
hb_itemRelease( itemRow );
hb_itemReturnRelease( pArray );
}