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 |
· 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. |
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. |
|