• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Microsoft Win32 Internet FunctionsOverview
The Microsoft® Win32® Internet (WinInet) API provides stand-alone applications with easy access to standardInternet protocols such as Gopher, FTP, and HTTP, abstracting the protocols into a high-level interface that isfamiliar to Win32 developers. See the Microsoft Win32 Internet Functions Referencefor descriptions of the individual functions.
Note
The Win32 Internet functions do not support server implementations and should not be used from a service.
Introduction to the Microsoft Win32 InternetFunctions
The following sections contain an overview of the Microsoft® Win32® Internet (WinInet) functions, which providedevelopers with a set of functions to interact with Gopher, FTP, and HTTP protocols. As the standards evolve, theWin32 Internet functions will handle the changes in underlying protocols, allowing the functions to maintain aconsistent behavior. This overview describes how to use these functions to access the vast resources on the Internet.The Win32 Internet functions do require an understanding of C/C++, a familiarity with Win32 programming, and a basic understanding of the FTP, Gopher, and HTTP protocols.
Internet Protocols
The three major protocols used on the Internet are the FTP, Gopher, and HTTP protocols.For the more information on these protocols, see the Request For Comments (RFC) documents that cover FTP,Gopher, and HTTP specifications. The following documents on these protocols can be found on the Internet:
RFC 959,
 File Transfer Protocol (FTP)
RFC 1436,
The Internet Gopher Protocol 
RFC 1945,
 Hypertext Transfer Protocol - HTTP/1.0
RFC 2068,
 Hypertext Transfer Protocol - HTTP/1.1
 
Establishing a Dial-Up Connection to theInternet
The Win32 Internet functions include seven functions that handle modem connections.InternetAutodialInitiates an unattended dial-up connection.InternetAutodialHangupDisconnects a modem connection initiated byInternetAutodial. InternetDial Initiates a dial-up connection.InternetGetConnectedState Retrieves the current state of the Internet connection.InternetHangUpDisconnects a modem connect initiated byInternetDial. InternetGoOnline Prompts the user for permission to initiate a dial-up connection to the given URL.
InternetAutodial Function
Causes the modem to automatically dial the default Internet connection.Syntax
BOOL InternetAutodial(IN DWORD dwFlags,IN HWND hwndParent);
Parameters
dwFlags
 Unsigned long integer value that contains the flags controlling this operation. Thiscan be one of the following values:INTERNET_AUTODIAL_FAILIFSECURITYCHECK Causes
InternetAutodial
to fail if file and printer sharing is disabled for Microsoft®Windows® 95/98.INTERNET_AUTODIAL_FORCE_ONLINEForces an online Internet connection.INTERNET_AUTODIAL_FORCE_UNATTENDEDForces an unattended Internet dial-up.
hwndParent 
 Handle to the parent window.
Return Value
Returns TRUE if successful, or FALSE otherwise.
Function Information
Windows NT
Use version 4.0. Implemented only as an ANSI function.
Windows
Use Windows 95 and later. Implemented only as an ANSI function.
Header
Wininet.h
Import library
Wininet.lib
 
Minimum availability
Internet Explorer 4.0
InternetAutodialHangup Function
Disconnects an automatic dial-up connection.Syntax
BOOL InternetAutodialHangup(IN DWORD dwReserved);
Parameters
dwReserved 
 Reserved. Must be set to zero.
Return Value
Returns TRUE if successful, or FALSE otherwise.
Function Information
Windows NT
Use version 4.0. Implemented only as an ANSI function.
Windows
Use Windows 95 and later. Implemented only as an ANSI function.
Header
Wininet.h
Import library
Wininet.lib
Minimum availability
Internet Explorer 4.0
InternetDial Function
Initiates a connection to the Internet using a modem.Syntax
DWORD InternetDial(IN HWND hwndParent,IN LPTSTR lpszConnectoid,IN DWORD dwFlags,OUT LPDWORD lpdwConnection,IN DWORD dwReserved);
The actual syntax of this function varies between its ANSI and Unicode implementations.For more information, seeWin32 Internet Functions Syntax.
Parameters
hwndParent 
 Handle to the parent window.
lpszConnectoid 
 Address of a string variable containing the name of the dial-up connection to use.
dwFlags
 Unsigned long integer value that contains the flags to use. This can be one of thefollowing values:INTERNET_AUTODIAL_FORCE_ONLINE
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...