Windows Internet (WinInet) Interface
Description

This library is an implementation of WinInet.DLL interface to support communication with HTTP, FTP & Gopher servers. It allows one to download files from the web or any local or remote ftp server. It also may be used to build web robots and web search engines.
 

Files

This distribution includes the following files:
 
WinInet.sll
WinInet.Prj
WinInet.Pol
WinInet.st
Windows Internet framework library and file-in source.
WinInet Workbench.txt Demo workspace expressions with description 

Additional files are included with the distribution in order to simplify creation of a working directory with VSE 3.1.2 to test the library.

Requirements

VS/VSE 3.1.2 for Win32s.  Requires the following libraries:
 
ARAddIns.sll SelfDefinedStructures support
ARMisc.sll Misc. OS Support
ARPatchs.sll Patches and bug fixes
WinInet.sll Windows Internet framework library
vreg31w.sll Registration Database Support
vslb31.sll Smalltalk Library Builder

Installation

Unzip the archive to a new directory.  Double click on vdevw.exe in this directory to open an image loaded with the required libraries.

Alternately, if you wish to install the library to an image of  your choice ensure the SLL and DLL libraries above are copyed to the VS/VSE library directory or a directory that appears in the Windows PATH statement.   Evaluate the following to load all the required libraries in your image:

#('ARBase' 'ARAddIns' 'ARMisc'  'ARPatchs' 'VREG31W' 'WinInet')
    do:[:lib|SmalltalkLibraryBinder bindTo:lib]

Examples

The file WinInet Workbench.txt contains a number of demo expressions that show how the framework may be used to access files and information from web and FTP sites.  The following expressions modify those found in the file

"Evaluate with 'show it' to display the HTTP header info at the given address"
  url := InternetFile new.
  url
    address: 'http://www.parcplace.com/'; "http server address"
    " addFlagExistingConnect; "
    yourself.
  string := url next: url queryDataAvailable.
  url release.
  string.

"Open a connection to an FTP server and login as anonymous"
  connection :=FTPConnection server: 'ftp.parcplace.com'.
  connection open.
  connection directoryNames. "browse directories..."
  connection release. "close the connection"

"Download a file from a Web server"
   url := InternetFile new.
   url address: 'http://www.sugarWeb.com/Miniatures/Files/HtmlKit.zip'.
  "Read entire contents of file HtmlKit.zip off site"
   fileStream := File newFile: 'HtmlKit.zip'.
   [[url queryDataAvailable > 0]
       whileTrue: [fileStream nextPutAll: (url next: url queryDataAvailable)]]
       ensure:
           [url release.
            fileStream close].
  "Run Winzip or similar in Windows to open on the file"
   (Smalltalk includesKey: #ProgramManager)
       ifTrue:
           [ProgramManager run: 'HtmlKit.zip'].

Contact

Alejandro F. Reimondo
Amenabar 3476 Piso: 2 Dto: B.
Ciudad de Buenos Aires.
Argentina.
Tel: (54)-1-703-5586.
aleReimondo@sugarWeb.com
http://www.sugarweb.com


Links to:
The ObjectShare web site
VisualSmalltalk Product Support
ObjectShare's Online Documentation Site