From: R.Wieser on 22 Dec 2009 14:55 Hello All, I recently asked the question if I could find out which protocol the the InternetOpenUrl command just did accept so I could the apropriate actions belonging to that protocol (mainly retrieving file-size upfront so I can create progress-bar). This has become even more important as the info from MS itself http://msdn.microsoft.com/en-us/library/aa385098(VS.85).aspx ) is unreliable : it specifies at the top that only the HTTP, HTTPS and FTP protocols are accepted, but somewhere down it allso mentions the GOPHER protocol. It allso mentions Windows 2000 Professional and Windows 2000 Server as the minimal requirements for the client and server respectivily, when the function has-and-stilll works allright on a Win98se OS. Apart from that I discovered from simply trying that apart from the above-mentioned protocols it allso accepts the FILE protocol, and who knows which other ones. So, I would be gratefull for any info about how to retrieve such information. Regards, Rudy Wieser P.s. Any info about retrieving the file-sizes for any of the accepted protocols would be welcome too (except for HTTP, that seems to work) . -- Origional question: R.Wieser <address(a)not.available> schreef in berichtnieuws 4b2e811a$0$4492$e4fe514c(a)dreader19.news.xs4all.nl... > Hello All, > > I'm currently diving into the InternetOpenUrl command and was > wondering if I could > > 1) ask it the protocol (HTTP, FTP, GOPHER) it has just accepted > (so I can use the apropriate commands to each protocol (for instance : > not trying to retrieve HTTP headers on a non-HTTP connection) > > 2) Retrieve the file-size when the protocol is not HTTP (I tried FTP, > but would like to be able to do the same for the other protocols). > I've tried the HTTP_QUERY_CONTENT_LENGTH method as > well as FtpGetFileSize, but both return an error. > > Regards, > Rudy Wieser
From: Friedel Jantzen on 23 Dec 2009 03:41 Hi, > ... > This has become even more important as the info from MS itself > http://msdn.microsoft.com/en-us/library/aa385098(VS.85).aspx ) is > unreliable : it specifies at the top that only the HTTP, HTTPS and FTP > protocols are accepted, but somewhere down it allso mentions the GOPHER > protocol. > > It allso mentions Windows 2000 Professional and Windows 2000 Server as the > minimal requirements for the client and server respectivily, when the > function has-and-stilll works allright on a Win98se OS. In the requirements section table of this link is a row "Version: IE 3.0 or later". Afaik wininet.dll is updated with the IE. > Apart from that I discovered from simply trying that apart from the > above-mentioned protocols it allso accepts the FILE protocol, and who knows > which other ones. Interesting. > P.s. > Any info about retrieving the file-sizes for any of the accepted protocols > would be welcome too (except for HTTP, that seems to work) . > I can help with FTP only: FtpGetFileSize (min. IE 5.0) http://msdn.microsoft.com/en-us/library/aa384159(VS.85).aspx MS does not say what is returned on error; perhaps it is like GetFileSize? Regards, Friedel
From: R.Wieser on 23 Dec 2009 05:05 Hello Friedel, > In the requirements section table of this link is a row > "Version: IE 3.0 or later". Afaik wininet.dll is updated > with the IE. I overlooked that, but for me that makes it even worse : what am I to believe ? The "minimum supported client/server" or the IE version. Due to my experience (it works in Win98se) I must assume the latter, but what is that "minimum supported" than doing there ? > I can help with FTP only: > FtpGetFileSize (min. IE 5.0) > MS does not say what is returned on error; perhaps it is > like GetFileSize? I must apologize, I did try that (on ftp://ftp.FreeBSD.org ) and got an error back. And yes, now you mention it its the same one as with the "GetDFileSize" function. I did not check the "GetLastError" result, as I was quite convinced I should have gotten a size and I assumed I used the function wrong. I'll have to retry. Thanks for the reply Regards, Rudy Wieser -- Origional message : Friedel Jantzen <nospam_plz(a)freenet.de> schreef in berichtnieuws 14ldhjxv2v500$.v6ppagy95x9g$.dlg(a)40tude.net... > Hi, > > > ... > > This has become even more important as the info from MS itself > > http://msdn.microsoft.com/en-us/library/aa385098(VS.85).aspx ) is > > unreliable : it specifies at the top that only the HTTP, HTTPS and FTP > > protocols are accepted, but somewhere down it allso mentions the GOPHER > > protocol. > > > > It allso mentions Windows 2000 Professional and Windows 2000 Server as the > > minimal requirements for the client and server respectivily, when the > > function has-and-stilll works allright on a Win98se OS. > > In the requirements section table of this link is a row "Version: IE 3.0 or > later". Afaik wininet.dll is updated with the IE. > > > Apart from that I discovered from simply trying that apart from the > > above-mentioned protocols it allso accepts the FILE protocol, and who knows > > which other ones. > > Interesting. > > > P.s. > > Any info about retrieving the file-sizes for any of the accepted protocols > > would be welcome too (except for HTTP, that seems to work) . > > > > I can help with FTP only: > FtpGetFileSize (min. IE 5.0) > http://msdn.microsoft.com/en-us/library/aa384159(VS.85).aspx > MS does not say what is returned on error; perhaps it is like GetFileSize? > > Regards, > Friedel
From: Friedel Jantzen on 24 Dec 2009 02:22 Hi Rudy, > >> In the requirements section table of this link is a row >> "Version: IE 3.0 or later". Afaik wininet.dll is updated >> with the IE. > > I overlooked that, but for me that makes it even worse : what am I to > believe ? The "minimum supported client/server" or the IE version. Due to > my experience (it works in Win98se) I must assume the latter, but what is > that "minimum supported" than doing there ? I guess, since "min. supported" it is shipped as a part of the OS, too. >> I can help with FTP only: >> FtpGetFileSize (min. IE 5.0) >> MS does not say what is returned on error; perhaps it is >> like GetFileSize? > > I must apologize, I did try that (on ftp://ftp.FreeBSD.org ) and got an > error back. And yes, now you mention it its the same one as with the > "GetDFileSize" function. I did not check the "GetLastError" result, as I > was quite convinced I should have gotten a size and I assumed I used the > function wrong. I'll have to retry. Yes, the cause of the failure is important. As the doc is insufficient, we only can try & error. Another way to get the FTP filesize is FtpFindFirstFile (min. IE 3.0) http://msdn.microsoft.com/en-us/library/aa384146(VS.85).aspx Regards, Friedel
|
Pages: 1 Prev: partially hidden borders of taskbar Next: using variables in RegCreateKeyEx raise type casts |