English
Source / code snippets

cache Dateidownload Download Http without Wininetdll

 
Have a problem - the Source shows by me the DeleteUrlCacheEntryA well only once - at first Male - whom cache deletes. at least see it so from because the Downloadabfragezeit only once long lasts - thereafter only yet 0ms. too the Result won't new loaded. If I but the URL z.B. NEN ?+st$(gettickcount) anhänge sustain I naturally each time one new - richtiges - Result. it sees means from as if DeleteUrlCacheEntryA not so operates How I it hope - nähhmlich simply always whom cache for URL delete.

What do I do wrong? its as though The Info on the Process glue - self one zweiter Thread deletes nothing. (tested with eigener DLL)
CompileMarkSeparation
not XPSE-code:
CompileMarkSeparation
 
02/22/07  
 



I see I ahne URL$ isn't always the right lever for To löschende File - will be time whom Callback benefit circa to find out How the File in the cache itself name.
 
02/22/07  
 



OK the works Schonmal - time look How itself now the cache behave:
CompileMarkSeparation
 {$cleq}
cls
print downloadfile(http://ip.mxii.com,ip.txt)
waitkey
end

DownloadFile (string url,destinationFileName){

    string content=
    long dllh=usedll(wininet.dll)
    long hInet = external(wininet.dll,InternetOpenA,myapp,0,nil,nil,0);
    //print hinet:,hinet
    long hFile = external(wininet.dll,InternetOpenUrlA,hInet,addr(url),nil,0,$80000000,0);
    //print hfile,hfile
    mem buf=1024
    //int fh=assign(destinationFileName)
    //openrw fh
    long bytesread

    do {

        external(wininet.dll,InternetReadFile,hFile,buf,1024,addr(bytesread))
        //print read:,bytesread

        if bytesread>0 {

            content=content+char$(buf,0,bytesread)
            //blockwrite fh,buf,0,bytesread

    } else { break }

}

//closerw fh
external(wininet.dll,InternetCloseHandle,hFile)
external(wininet.dll,InternetCloseHandle,hInet)
dispose buf
freedll dllh
return c
}
 
02/22/07  
 



working, no cache More. now can I the the Downloadunit procure...
 
02/22/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.394 Views

Themeninformationen

this Topic has 1 subscriber:

iF (4x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie