Purpose
Establishes an HTTP connection and gets a handle to a CHttpConnection object.
Syntax
MIGetHttpConnection( ByVal hSession As CInternetSession,
ByVal strServer As String, ByVal nPort As INTERNET_PORT
As CHttpConnection
hSession is a CinternetSession handle.
strServer is a string that contains the HTTP server name.
nPort is a number that identifies the TCP/IP port to use on the server.
Return Value
A handle to a CHttpConnection object. If the call fails, Null is returned. To determine the cause of the failure, call the MIGetErrorMessage() function.
Description
MIGetHttpConnection() connects to an HTTP server, creates and returns a handle to a CHttpConnection object. It does not perform any specific operation on the server. If you intend to query an HTTP header, for example, you must perform this operation in separate steps.
The caller has to dispose of the handle by calling the MICloseHttpConnection() procedure when the handle is no longer in use.