forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


DownloadToFile
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units
View previous topic :: View next topic  
Author Message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Feb 05, 2004 8:38 pm    Post subject: Reply with quote

FreezingFire wrote:
What would the world come to if nobody used
Windows 95 anymore? We'd never have anybody to test for compatibility Razz


If nobody had Windows 95, I don't testing on it is really useful... Wink

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Feb 05, 2004 8:39 pm    Post subject: Reply with quote

But you get the occasional customer who complains about some strange
error, and when you troubleshoot it you find it's due to Windows 95. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Feb 05, 2004 8:41 pm    Post subject: Reply with quote

You just said nobody is using Windows 95 anymore... Very Happy

Ps. For the ones who like to see the other functions of the urlmon.dll, you can look at this MSDN article. It also explains a bit how to add a progress bar to the URLDownloadToFile function... Smile

http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/reference/functions/urldownloadtofile.asp

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Feb 05, 2004 8:42 pm    Post subject: Reply with quote

Skit3000 wrote:
You just said nobody is using Windows 95 anymore... Very Happy


OK You win. Razz Wink

There's people out there who use Win 95, I'm sure, but hardly any. Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Feb 05, 2004 8:48 pm    Post subject: Reply with quote

This code doesn't seem to work for the IsValidURL function of that library. Sad

Code:
#should show an invalid url
%U = sfdsf
loadlib urlmon.dll
%A = @lib(urlmon,IsValidURL,NIL:,INT:,@ADDR("%U"),INT:0)
freelib urlmon.dll
info %A


# HRESULT IsValidURL(          LPBC pBC,
#     LPCWSTR szURL,
#     DWORD dwReserved
# );

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2146
Location: A House

PostPosted: Thu Feb 05, 2004 9:13 pm    Post subject: Reply with quote

I think I found a bit of a drawback to using this api to get a file from
online. It seems to be grabbing it from cache and not directing from
the site being called. That is, at least with .php files. What I'm doing,
is grabbing pages from the forums here, and I noticed that I'm not
getting the most recent page by doing this.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Feb 05, 2004 11:35 pm    Post subject: Reply with quote

You might look at the code in the VDS HTTP Project in the Open Source
forum - you can just grab the page and get it into a variable, then save
it for processing or even do it all internally in your application without
having to download the file to disk first. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2146
Location: A House

PostPosted: Thu Feb 05, 2004 11:39 pm    Post subject: Reply with quote

Thanks FreezingFire. Smile
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Feb 06, 2004 3:25 pm    Post subject: Reply with quote

Garrett wrote:
It seems to be grabbing it from cache and not directing from the site being called. That is, at least with .php files.


In the code, I used the "$10" number to let the function know it should not use the cache file, but I guess something is wrong with it then.. Confused

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2146
Location: A House

PostPosted: Fri Feb 06, 2004 7:03 pm    Post subject: Reply with quote

Not sure the code can do anything about it. I had to go into my internet
settings and set it to check for new version every visit. I was set to
Automatic. Now the api gets the new version of the page every time.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 11, 2004 2:55 pm    Post subject: Reply with quote

It works in Win95 - with VDSug.dll anyway. Razz Laughing

http://forum.vdsworld.com/viewtopic.php?p=19021#19021

It doesn't download php files for me - I assume because they
are created "on the fly" as you log on. It seems to works fine
for existing files though. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Mar 11, 2004 5:23 pm    Post subject: Reply with quote

Mac, what does it look like when you download PHP files? Does it just not
work?

I think it should not have a problem since all output from the server is
HTML, there's no PHP code sent from the server.

Just wondering. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 11, 2004 11:02 pm    Post subject: Reply with quote

It tries to dload a php file (accesses the internet anyway)
just doesn't retrieve it. No errors, just no file. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Thu Mar 11, 2004 11:30 pm    Post subject: Reply with quote

That's strange because php, cgi and asp scripts simply are outputting html back to the browser window. These scripts are parsed and interpreted by the server before any output is sent back to browser.

I imagine the urlmon is not sending required information to the server to tell it what sort of client it is.
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 11, 2004 11:41 pm    Post subject: Reply with quote

Could be PK - here's the info on the params. We are using null
in the first one, but maybe this would give the server more info
(if anyone knows what to put in it?). Confused

Quote:

Parameters

pCaller
Pointer to the controlling IUnknown interface of the calling Microsoft ActiveX component (if the caller is an ActiveX component). If the calling application is not an ActiveX component, this value can be set to NULL. Otherwise, the caller is a Component Object Model (COM) object that is contained in another component (such as an ActiveX control within the context of an HTML page). This parameter represents the outermost IUnknown of the calling component. The function attempts the download within the context of the ActiveX client framework and allows the caller's container to receive callbacks on the progress of the download.

szURL
Pointer to a string value containing the URL to be downloaded. Cannot be set to NULL.

szFileName
Pointer to a string value containing the name of the file to create for bits that come from the download.

dwReserved
Reserved. Must be set to 0.

lpfnCB
Pointer to the caller's IBindStatusCallback interface. URLDownloadToFile calls this interface's IBindStatusCallback::OnProgress method on a connection activity, including the arrival of data. IBindStatusCallback::OnDataAvailable is never called. Implementing IBindStatusCallback::OnProgress allows a caller to implement a user interface or other progress monitoring functionality. It also allows the download operation to be canceled by returning E_ABORT from the IBindStatusCallback::OnProgress call. This can be set to NULL.

Return Value is one of the following values:

E_OUTOFMEMORY The buffer length is invalid or there was insufficient memory to complete the operation.

S_OK The operation succeeded.


BTW, in Skit's example - I think he put the $10 in the reserved param
that should be zero. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group