Navigation:  thinBasic Modules > INet >

INET_Internet_Open

Previous pageReturn to chapter overviewNext page

 

Description

 

Initializes an application's use of the operating system WinINet functions.

 

Syntax

 

hInternet = INET_Internet_Open(sAgent, dwAccessType [, sProxyName [, sProxyByPass [, dwFlags]]])

 

Returns

 

Returns a valid handle that the application passes to subsequent WinINet functions.

If function fails, it returns %NULL.

 

Parameters

 

Name

Type

Optional

Meaning

sAgent

String

No

String that specifies the name of the application or entity calling the WinINet functions. This name is used as the user agent in the HTTP protocol.

dwAccessType

Numeric

No

Type of access required. See INET Equates for the list of possible values.

sProxyName

String

Yes

String that specifies the name of the proxy server(s) to use when proxy access is specified by setting dwAccessType to %INTERNET_OPEN_TYPE_PROXY.

sProxyByPass

String

Yes

string that specifies an optional list of host names or IP addresses, or both, that should not be routed through the proxy when dwAccessType is set to %INTERNET_OPEN_TYPE_PROXY.

dwFlags

Number

Yes

Options. This parameter can be a combination multiple values. See INET Equates for the list of possible values.

 

Remarks

 

INET_Internet_Open is the first WinINet function called by an application. It tells the Internet DLL to initialize internal data structures and prepare for future calls from the application. When the application finishes using the Internet functions, it should call INET_Internet_CloseHandle to free the handle and any associated resources.

 

The application can make any number of calls to INET_Internet_Open, though a single call is normally sufficient. The application might need to define separate behaviors for each INET_Internet_Open instance, such as different proxy servers configured for each.

 

After the calling application has finished using the hInternet handle returned by INET_Internet_Open, it must be closed using the INET_Internet_CloseHandle function.

 

Restrictions

 

See also

 

Examples