Enrico Maria Giordano wrote:You have to open and close the second dialog twice to see the crash. And the problem started with a recent FWH release (I don't know exactly which one).
Master Nages, this is what I see. I don't know if it's correct.
#include "FiveWin.ch"
#include "Fileio.ch"
Function Main()
local oBrw, oDlgMain, uData
SET EXCLUSIVE OFF
SET DELETED ON
SET OPTIMIZE ON
SetGetColorFocus()
USE CUSTOMER NEW ALIAS CUST SHARED VIA 'DBFCDX'
DATABASE uData
DEFINE DIALOG oDlgMain SIZE 640,460 PIXEL TITLE 'Doppio click su una colonna' ;
@ 10,10 XBROWSE oBrw SIZE -10,-30 PIXEL OF oDlgMain ;
COLUMNS 'First', 'City', 'Age', 'Salary' ;
PICTURES nil, nil, '999', '99,999,999.99' ;
OBJECT uData ;
AUTOSORT CELL LINES NOBORDER ;
ON DBLCLICK StampaFattura()
WITH OBJECT oBrw
:nStretchCol := STRETCHCOL_WIDEST
:CreateFromCode()
END
@ 210,270 BUTTON 'Close' SIZE 40,14 PIXEL OF oDlgMain ACTION oDlgMain:End()
ACTIVATE DIALOG oDlgMain CENTERED
Return nil
Function StampaFattura()
Local cPathXMl_ := ''
Local cFilter := "Fatture XML | *.xml |"
LOCAL oActivex ,oDlg ,cUrl := '' , cXT := ''
Local cTmpFile := cTempFile() +'.XML' ,cText := '' ,cFile := '' , nFile := 0
Local cschema := '' ,lStampata := .f. ,lauto := .F.
//cFile := '\\linux\dati\sql\mastronipe\FATTURE_XML\PASSIVE\IT10168371002_00ZOY.xml'
cFile := 'FATTURA.xml'
IF ! file(cFile)
? '2-File non trovato ' + cFile
Return .f.
ENDIF
cText := MemoRead( cFile )
//cSchema := 'FoglioStileAssoSoftware.xsl'
cSchema := 'http:\\www.nipeservice.it\FS\FoglioStile.xsl'
nFile := FCreate( cTmpFile, FC_NORMAL )
IF FWrite( nFile, cText ) <> Len( cText )
? "Errore scrittura file: " + cTmpFile + " " + FError()
RETURN nil
ENDIF
IF .NOT. Fclose( nFile )
? "Errore creazione file: " + cTmpFile + " " + FError()
RETURN nil
ENDIF
cTmpFile := GetCurDir() + '\' + cTmpFile
nFile := FCreate( cTmpFile, FC_NORMAL )
cText := '<?xml-stylesheet type="text/xsl" href="' + cSchema + '"?>' + CRLF + ;
strtran(cText,"","")
IF FWrite( nFile, cText ) <> Len( cText )
? "Errore scrittura file: " + cTmpFile + " " + str(FError())
RETURN nil
ENDIF
IF .NOT. FClose( nFile )
? "Errore creazione file: " + cTmpFile + " " + str(FError())
RETURN nil
ENDIF
cUrl := cTmpFile
// http://forums.fivetechsupport.com/viewt ... hell+print
//-------------------------------------------------------------------------------------------
DEFINE DIALOG oDlg TITLE 'Fattura XML ' + cFile SIZE 830, 600 RESIZABLE
@ 40, 0 ACTIVEX oActiveX PROGID "Shell.Explorer" OF oDlg
oActiveX:nDlgCode = DLGC_WANTALLKEYS
oDlg:oClient = oActiveX
oDlg:bStart := <||
oDlg:Resize()
oActiveX:Navigate( cURL )
oActiveX:StatusBar = .t.
Return .t.
>
ACTIVATE DIALOG oDlg CENTERED
Return lStampata
karinha wrote:Funciona mui bien!
Maurizio wrote:Thanks for the help but
You definitely don't use August 2024
Maurizo
Application Internal Error - E:\FW\XML\BUG.EXE
Terminated at: 2024-10-04 15:20:02
Unrecoverable error 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:03CF9748
EAX:00CCDC44 EBX:71B03380 ECX:03CF9748 EDX:03CF4D48
ESI:03CF9748 EDI:010FD74C EBP:010FD770
CS:EIP:0023:03CF9748 SS:ESP:002B:010FD744
DS:002B ES:002B FS:0053 GS:002B
Flags:00010206
Exception Parameters: 00000008 03CF9748
CS:EIP: 00 00 00 00 39 00 00 00 3C DC CC 00 3C DC CC 00
SS:ESP: 71B01CE8 03CF4D48 71B017B0 014017EC 07EA7A30 07E8908C 76444DBD 00000000 03CF4D48 0000000A 013FAE54 010FD9C8 71AFFE95 01401768 71A774F0 71A77470
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
03CF9748 010FD770 010FD9C8 71AFFE95 01401768 71A774F0 71A77470 010FD7B8 71AFFDF0 01401758 71AFFA80 75BF5C50
71AFFE95 010FD9C8 010FD9E4 71AFFAC7 014017EC 07E8908C 00000000 0140D150 010FDA10
71AFFAC7 010FD9E4 010FDA00 71AE1DBB 07E8908C 00000000 71AE1D90 010FDA10 0140D1DC
71AE1DBB 010FDA00 010FDA34 70CB25C1 0140D1DC 07E8908C 00000000 06AF1400 00000003 70CAF3FA 06AEE5A0 06AF1400
70CB25C1 010FDA34 010FDA64 70CAA2BA 00000000 00000000 00000000 00000008 06AF1400 06AF1400 010FDC08 00000000
70CAA2BA 010FDA64 010FDC08 70A6E90C 00000000 00000000 06AF1400 00000000 00000000 00000001 010FDC2C 00000000
70A6E90C 010FDC08 010FDC30 70BE20B0 06AF1400 00000008 00000000 00000000 010FDC2C 010FDC38 70BE2030 00000000
70BE20B0 010FDC30 010FDC50 70BE0A16 00000000 0139E8E8 06AF1400 01426148 01426148 00000000
70BE0A16 010FDC50 010FDCB0 70C3BD45 010FDCB8 70C3BB10 06AF1400 00000000 06AECA00 70C3C1B0 0139E8E8 010F0003
70C3BD45 010FDCB0 010FDCD0 70B9D84E 010FDCF0 06AF1400 06B5B260 010FDCDC 06AF1400 06EE0000
70B9D84E 010FDCD0 010FDCE4 70BE2667 00000002 00000000 70D70F10
70BE2667 010FDCE4 010FDD0C 71ADFDF6 06AF1400 010FDD18 70D6C4E0 0140D150 0140D150 06B9A930 014017B8 00000000
71ADFDF6 010FDD0C 010FDD30 71AF6C67 06B5B260 00000000 013F8870 01401758 00000002 000003F0 00000000
71AF6C67 010FDD30 010FDD48 71AF6B40 00000000 0140D150 71AF6B20 01401864
71AF6B40 010FDD48 010FDD70 71AF338E 013F8870 00000000 71AF3230 71B11280 01401758 013F8870 00000000 00000000
71AF338E 010FDD70 010FDD90 71AF3238 01401758 71B112D5 010FDD98 71B11280 00000002 01401758
71AF3238 010FDD90 010FE5FC 71B1AB8A 00000000 013FAE7C 00000000 01401758 733EAD20 010FDDD8 00000000 00450438
71B1AB8A 010FE5FC 010FE628 71B1A84A 002B0526 00000002 00000000 00000000 71C08450 013FAE7C 00000002 01401758
71B1A84A 010FE628 010FE654 71B1A4F3 002B0526 00000002 00000000 00000000 00000002 002B0526 71B1A450 0000000D
71B1A4F3 010FE654 010FE680 75BF3133 002B0526 00000002 00000000 00000000 002B0526 DCBAABCD 71B1A450 00000002
Modules:
00810000 00501000 E:\FW\XML\BUG.EXE
76E70000 001B2000 C:\WINDOWS\SYSTEM32\ntdll.dll
75E40000 000F0000 C:\WINDOWS\System32\KERNEL32.DLL
76040000 00282000 C:\WINDOWS\System32\KERNELBASE.dll
75AA0000 0007F000 C:\WINDOWS\System32\ADVAPI32.DLL
75D70000 000C4000 C:\WINDOWS\System32\msvcrt.dll
75020000 00085000 C:\WINDOWS\System32\sechost.dll
74B60000 0001A000 C:\WINDOWS\System32\bcrypt.dll
74F60000 000BA000 C:\WINDOWS\System32\RPCRT4.dll
74AA0000 000B8000 C:\WINDOWS\System32\COMDLG32.DLL
75B40000 00079000 C:\WINDOWS\System32\msvcp_win.dll
76300000 00112000 C:\WINDOWS\System32\ucrtbase.dll
73B50000 00019000 C:\WINDOWS\SYSTEM32\MPR.DLL
74C70000 00280000 C:\WINDOWS\System32\combase.dll
72170000 00008000 C:\WINDOWS\SYSTEM32\VERSION.DLL
76420000 000C6000 C:\WINDOWS\System32\shcore.dll
736D0000 0007F000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
75BC0000 001A9000 C:\WINDOWS\System32\USER32.dll
74EF0000 0001A000 C:\WINDOWS\System32\win32u.dll
762D0000 00023000 C:\WINDOWS\System32\GDI32.dll
74B80000 000E2000 C:\WINDOWS\System32\gdi32full.dll
74F10000 0004B000 C:\WINDOWS\System32\SHLWAPI.dll
720D0000 00091000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.22621.3527_none_fbe8b6227808ef55\COMCTL32.DLL
764F0000 006A5000 C:\WINDOWS\System32\SHELL32.dll
75250000 00155000 C:\WINDOWS\System32\OLE32.DLL
76C40000 0009C000 C:\WINDOWS\System32\OLEAUT32.DLL
76DF0000 0005F000 C:\WINDOWS\System32\WS2_32.DLL
73750000 00031000 C:\WINDOWS\SYSTEM32\WINMM.DLL
73560000 0016D000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.4249_none_9fa845ade2942f6e\GDIPLUS.DLL
72090000 0002E000 C:\WINDOWS\SYSTEM32\OLEDLG.DLL
720C0000 00006000 C:\WINDOWS\SYSTEM32\MSIMG32.DLL
72F40000 00024000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
73790000 00083000 C:\WINDOWS\SYSTEM32\UXTHEME.DLL
75120000 00025000 C:\WINDOWS\System32\IMM32.DLL
75F30000 00108000 C:\WINDOWS\System32\MSCTF.dll
73840000 00227000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.3672_none_6ec0f0a887fe525b\comctl32.DLL
74A80000 00013000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
750B0000 00063000 C:\WINDOWS\System32\bcryptPrimitives.dll
73460000 000F6000 C:\WINDOWS\SYSTEM32\textinputframework.dll
73390000 000CD000 C:\WINDOWS\SYSTEM32\CoreMessaging.dll
730F0000 00291000 C:\WINDOWS\SYSTEM32\CoreUIComponents.dll
742B0000 000C7000 C:\WINDOWS\SYSTEM32\wintypes.dll
730E0000 0000B000 C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL
72E40000 00095000 C:\WINDOWS\SYSTEM32\TextShaping.dll
751C0000 00082000 C:\WINDOWS\System32\clbcatq.dll
71A30000 0065F000 C:\Windows\System32\ieframe.dll
73D40000 0023A000 C:\Windows\System32\iertutil.dll
72A70000 0001F000 C:\Windows\System32\USERENV.dll
73F90000 0001D000 C:\Windows\System32\srvcli.dll
71950000 000DC000 C:\Windows\System32\WINHTTP.dll
73F80000 0000B000 C:\Windows\System32\netutils.dll
718C0000 00085000 C:\WINDOWS\SYSTEM32\sxs.dll
74380000 006F5000 C:\WINDOWS\SYSTEM32\windows.storage.dll
74180000 0003D000 C:\WINDOWS\SYSTEM32\CFGMGR32.dll
71880000 0003C000 C:\WINDOWS\SYSTEM32\msIso.dll
73FB0000 001A2000 C:\WINDOWS\SYSTEM32\urlmon.dll
741E0000 000C7000 C:\WINDOWS\SYSTEM32\PROPSYS.dll
72220000 000E8000 C:\Windows\System32\Windows.System.Launcher.dll
721B0000 00067000 C:\Windows\System32\msvcp110_win.dll
72190000 00013000 C:\WINDOWS\SYSTEM32\windows.staterepositorycore.dll
73CB0000 00026000 C:\WINDOWS\SYSTEM32\SspiCli.dll
73C90000 00012000 C:\WINDOWS\SYSTEM32\virtdisk.dll
71870000 0000E000 C:\Program Files\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\Office16\MSOXMLMF.DLL
71850000 00015000 C:\Program Files\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\Office16\VCRUNTIME140.dll
70540000 0130A000 C:\Windows\System32\mshtml.dll
72BA0000 00045000 C:\WINDOWS\SYSTEM32\powrprof.dll
70520000 00012000 C:\Windows\System32\wkscli.dll
72B90000 0000E000 C:\WINDOWS\SYSTEM32\UMPDC.dll
704F0000 00029000 C:\Windows\System32\srpapi.dll
70390000 00158000 C:\WINDOWS\System32\msxml3.dll
73C40000 00043000 C:\WINDOWS\SYSTEM32\WLDP.DLL
72310000 0048E000 C:\WINDOWS\System32\WININET.dll
70350000 00035000 C:\WINDOWS\system32\mlang.dll
6FF80000 003CD000 C:\Windows\System32\jscript9.dll
6FF70000 0000E000 C:\WINDOWS\system32\msimtf.dll
6FEA0000 000CA000 C:\Windows\System32\dxgi.dll
6F980000 0051B000 C:\Windows\System32\d2d1.dll
6F950000 0002D000 C:\WINDOWS\SYSTEM32\dxcore.dll
6F720000 00224000 C:\Windows\System32\DWrite.dll
6F6E0000 0003C000 C:\WINDOWS\SYSTEM32\directxdatabasehelper.dll
6F4A0000 00238000 C:\Windows\System32\d3d11.dll
6EEA0000 005F3000 C:\WINDOWS\SYSTEM32\d3d10warp.dll
6EE50000 0004C000 C:\WINDOWS\system32\dataexchange.dll
6EC50000 001FB000 C:\WINDOWS\system32\twinapi.appcore.dll
6EC40000 0000A000 C:\WINDOWS\SYSTEM32\Secur32.dll
741C0000 0001D000 C:\WINDOWS\SYSTEM32\profapi.dll
6EB90000 000A6000 C:\WINDOWS\SYSTEM32\apphelp.dll
Called from DIALOGBOXINDIRECT(0) in .\source\classes\dialog.prg
Called from TDIALOG:ACTIVATE(309) in .\source\classes\dialog.prg
Called from STAMPAFATTURA(106) in BUG.prg
Called from (b)MAIN(24) in BUG.prg
Called from TWINDOW:LDBLCLICK(2153) in .\source\classes\window.prg
Called from TCONTROL:LDBLCLICK(1890) in .\source\classes\control.prg
Called from TXBROWSE:LDBLCLICK(5424) in .\source\classes\xbrowse.prg
Called from TWINDOW:HANDLEEVENT(0) in .\source\classes\window.prg
Called from TCONTROL:HANDLEEVENT(1877) in .\source\classes\control.prg
Called from TXBROWSE:HANDLEEVENT(12553) in .\source\classes\xbrowse.prg
Called from _FWH(3699) in .\source\classes\window.prg
Called from DIALOGBOXINDIRECT(0) in .\source\classes\dialog.prg
Called from TDIALOG:ACTIVATE(309) in .\source\classes\dialog.prg
Called from MAIN(33) in BUG.prg
------------------------------------------------------------------------
With the June 2023 version it works correctly
Enrico Maria Giordano wrote:Please note what Maurizio wrote in the first message:With the June 2023 version it works correctly
So the fault is not in the way Maurizio is compiling his program.
I tested with xHarobour 32 bits, Harbour bcc32, msvc32
with FWH2409 and FWH2307
All worked the same way without any problems.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 37 guests