HttpConnect
Starts a new HTTP connection to the specified server.
#include <httpexp.h>
#include <httpclnt.h>
HINTERNET HttpConnect (
HINTERNET hndl,
char *pServerName,
UINT32 serverPort,
UINT32 flags,
UINT32 *pFailureReasonCode);
If successful, returns an HTTP client connection handle. Otherwise, returns NULL.
On failure, the pFailureReasonCode parameter returns one of the following values:
The HttpConnect function validates the connection information. This information, along with some other information, is stored in the handle. The actual connection is not made until an HttpSendRequest or HttpGetReply call is made.
The HttpConnect function must be followed by an HttpOpenRequest call, which allows you to format the request.