AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

InternetOpenUrl

Begins reading a complete FTP, Gopher, or HTTP Universal Resource Locator (URL). Use InternetCanonicalizeUrl first if the URL being used contains a relative URL and a base URL separated by blank spaces.

VB4-32,5,6
Declare Function InternetOpenUrl Lib "wininet" Alias "InternetOpenUrlA" (ByVal hInternetSession As Long, ByVal lpszUrl As String, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long

Operating Systems Supported
Requires Windows NT 4.0 or later; Win9x/ME: Not supported

Library
Wininet

Parameter Information
· hInternetSession
Handle of the current Internet session. The handle must have been returned by a previous call to InternetOpen.

· lpszUrl
Address of a string that contains the URL to begin reading. Only URLs beginning with ftp:, gopher:, http:, or https: are supported.

· lpszHeaders
Address of a string that contains the headers to be sent to the HTTP server. (For more information, see the description of the lpszHeaders parameter to HttpSendRequest.)

· dwHeadersLength
Length, in characters, of the additional headers. If this parameter is -1L and lpszHeaders is not NULL, lpszHeaders is assumed to be zero-terminated (ASCIIZ) and the length is calculated.

· dwFlags
Action flags. Can be one of these values:
INTERNET_FLAG_RELOAD
Get the data from the wire even if it is locally cached.
INTERNET_FLAG_DONT_CACHE
Do not cache the data, either locally or in any gateways.
INTERNET_FLAG_RAW_DATA
Return raw data (WIN32_FIND_DATA structures for FTP, and GOPHER_FIND_DATA structures for Gopher). If this flag is not specified, InternetOpenUrl returns HTML formatted for directories.
INTERNET_FLAG_SECURE
Request secure transactions on the wire with Secure Sockets Layer or PCT. This flag applies to HTTP requests only.
INTERNET_FLAG_EXISTING_CONNECT
If possible, reuse the existing connections to the server for new requests generated by InternetOpenUrl instead of creating a new session for each request.

· dwContext
An application-defined value that is passed, along with the returned handle, to any callback functions.

Return Values
Returns a valid handle to the FTP, Gopher, or HTTP URL if the connection is successfully established, or NULL if the connection fails. To get a specific error code, call GetLastError. To determine why access to the service was denied, call InternetGetLastResponseInfo.

Examples

Related Functions

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/