Not what you asked for, but I had great success in the past with curl (actually its c++ binding, curlpp): http://curl.haxx.se/libcurl/cplusplus/
It has an api to download a file to a location on the disk, but you'll have to code a dialog asking a username/password yourself. You'll also have to implement any IE password caching. HTH. cheers, roel /dev/null wrote: > I know one of you guys probably has this tucked away in his toolchest > somewhere and it's been so long since I did VC++ stuff (I'm embarased to > admit). > > Here's the trick. I have a website that requires authentication (standard > name/password popup). This site has several files that I want to download > programatically and save to the local hard drive of the user's computer. > The > user will have already gone to the website once and entered their name/pass > and might have it "remembered". > > So the code will look something like this: > > WebFile = OpenFile( "http://site.com/path/file.name" ) > LocalFile = open( "c:/path/to/local.file" ); > while( read( WebFile ) ) > { > write( LocalFile ); > } > > The catch is it has to handle the authentication. I'm assuming m$ has a > http > file class or api that will open the file and ask the user for > authentication as needed. But it's been so long since I looked at stuff > like > this I figured I better ask you guys before I waste several hours looking > around. > > Thanks for any help you guys may have! > > > > _______________________________________________ > msvc mailing list > [email protected] > See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for > subscription changes, and list archive. > _______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
