URLDownloadToFile Error
Posted: Thu Nov 16, 2017 3:01 pm
hi,
I have this function:
and this code:
and get this error:
Application
===========
Path and name: C:\DCasta\DCasta.exe (32 bits)
Size: 2,560,512 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
FiveWin Version: FWHX 11.12
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 6 secs
Error occurred at: 16-11-2017, 15:58:23
Error description: Error BASE/1089 Argument error: ABS
Args:
[ 1] = P 0x6D510000
Stack Calls
===========
Called from: => ABS( 0 )
Called from: chkexe.prg => URLDOWNLOADTOFILE( 0 )
Called from: chkexe.prg => CHKEXE( 39 )
Called from: DCasta.prg => (b)BUILDMENU( 201 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 461 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1033 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 980 )
Called from: DCasta.prg => MAIN( 82 )
thank you for your help
I have this function:
- Code: Select all Expand view
DLL FUNCTION URLDOWNLOADTOFILE( pCaller AS LONG, cUrl AS LPSTR, cFileName AS LPSTR, nReserved AS DWORD, nFnCB AS LONG ) AS LONG;
PASCAL FROM "URLDownloadToFileA" LIB "urlmon.dll"
and this code:
- Code: Select all Expand view
LOCAL hLib
...
hLib = LOADLIBRARY( "urlmon.dll")
IF !FILE("GIOGEN.EXE")
if URLDOWNLOADTOFILE( 0, "\\192.168.1.198\pubblica\GIOGEN.EXE", "GIOGEN.EXE" ) = 0
else
MSGINFO("COLLEGAMENTO AL SERVER MANCANTE"+CRLF+ ;
"CONTATTARE AMMINISTRATORE DI SISTEMA","01 - ATTENZIONE")
lOk := .f.
ENDIF
...
endif
and get this error:
Application
===========
Path and name: C:\DCasta\DCasta.exe (32 bits)
Size: 2,560,512 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
FiveWin Version: FWHX 11.12
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 6 secs
Error occurred at: 16-11-2017, 15:58:23
Error description: Error BASE/1089 Argument error: ABS
Args:
[ 1] = P 0x6D510000
Stack Calls
===========
Called from: => ABS( 0 )
Called from: chkexe.prg => URLDOWNLOADTOFILE( 0 )
Called from: chkexe.prg => CHKEXE( 39 )
Called from: DCasta.prg => (b)BUILDMENU( 201 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 461 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1033 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 980 )
Called from: DCasta.prg => MAIN( 82 )
thank you for your help