CInternetSession - Creates and initializes a single or several simultaneous Internet sessions and, if necessary, describes your connection to a proxy server.
CInternetSession is a MFC wrapper over WinInet.dll which gets installed with Internet Explorer(IE).
The Constructor of "CInternetSession" looks like -
CInternetSession(
LPCTSTR pstrAgent = NULL,
DWORD_PTR dwContext = 1,
DWORD dwAccessType = PRE_CONFIG_INTERNET_ACCESS,
LPCTSTR pstrProxyName = NULL,
LPCTSTR pstrProxyBypass = NULL,
DWORD dwFlags = 0
);
Details:
dwAccessType :
The type of access required. The following are valid values, exactly one of which may be supplied:
INTERNET_OPEN_TYPE_PRECONFIG - Connect using preconfigured settings in the registry. This access type is set as the default. To connect through a TIS proxy, set dwAccessType to this value; you then set the registry appropriately.
INTERNET_OPEN_TYPE_DIRECT - Connect directly to Internet.
INTERNET_OPEN_TYPE_PROXY - Connect through a CERN proxy.
For information on connecting with different types of proxies, see Steps in a Typical FTP Client Application.
pstrProxyName :
The name of the preferred CERN proxy if dwAccessType is set as INTERNET_OPEN_TYPE_PROXY. The default is NULL.
pstrProxyBypass :
A pointer to a string containing an optional list of server addresses. These addresses may be bypassed when using proxy access. If a NULL value is supplied, the bypass list will be read from the registry. This parameter is meaningful only if dwAccessType is set to INTERNET_OPEN_TYPE_PROXY.