Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Networking, Protocols, & Data Formats

InetAll Sample

Download sample

Description

INetAll sample is a client application that can download files using FTP, HTTP, or FILE protocols. It implements FTP and HTTP URL access using Wininet functions, and FILE URL access using Win32 CopyFile API

More Details

This sample uses InternetOpenUrl, InternetReadFile to do FTP and HTTP access. When accessing a FTP server with direct Internet access or a TIS proxy server, it also uses the INTERNET_FLAG_RAW_DATA flag in InternetOpenUrl and InternetFindNextFile to enumerate the directories and files on the FTP server. When a CERN proxy is used to do FTP, the proxy server uses FTP protocol to communication with the FTP server, and HTTP Protocol with the client. You can not use INTERNET_FLAG_RAW_DATA with a CERN proxy server. (Better viewed with fixed with font such as Courier.) Get ftp://host.com/root/test.doc HTTP 1.0 FTP Request |=========| |=============| |=============| | |---------------->| Cern-based |--------->| | | Client | HTTP | Proxy Server| FTP | Ftp Server | | |<----------------| |<---------| | |=========| |=============| |=============| HTTP/1.0 200 FTP Response To pass username and password to InternetOpenUrl, the sample internally constructs a URL in the following format: http://username:password@server:port/path To enumerate directories and files for a FILE URL, the sample uses WNetOpenEnum, WNetEnumResource, WNetClose to enumerates shares given a machine name; and FindFileFile, FindNextFile, FindClose to enumerate sub-directories and files of a complete UNC name.

Browser/Platform Compatibility

This sample is supported in Win32 platforms.

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site