HttpClientOpen

Initializes the HTTP client interface.

Syntax

    #include <httpexp.h>
    #include <httpclnt.h> 
     
    HINTERNET HttpClientOpen (
       char                        *appName,
       struct proxyInfoStructure   *pProxyInfo,
       UINT32                       dwFlags,
       UINT32                      (*pServiceFunction)(
                                     HINTERNET   hndl,
                                     void       *pRes,
                                     UINT32      szRes,
                                     UINT32      informationBits),
       void                         *pReserved,
       void                         *pRTag,
       UINT32                       *pFailureReasonCode);
    

Parameters

appName
(IN) Points an ASCIIZ string, which contains the name of your application.
pProxyInfo
(IN) Reserved for future use. Set to NULL.
dwFlags
(IN) Reserved for future use. Set to 0.
pServiceFunction
(IN) Points to the function to invoke when the HTTP client detects a situation that requires the user's attention. This function is passed the following parameters:
  • hndl—Specifies the stack handle returned from the HttpClientOpen function.
  • pRes—Reserved for future use. Returns NULL.
  • szRes—Reserved for future use. Returns 0.
  • informationBits—Reserved for future use.
pReserved
(IN) Reserved for future use. Set to NULL.
pRTag
(IN) Points to a NetWare resource tag, allocated with a signature of NetWareHttpClientResourceSignature.
pFailureReasonCode
(OUT) Points to an error code, if the open fails. If the open is successful, returns 0.

Return Values

If successful, returns an HTTP stack handle. Otherwise, returns NULL.

On failure, the pFailureReasonCode parameter returns one of the following values.

Decimal

Name

Description

150

ERR_NO_ALLOC_SPACE

Insufficient memory to perform the operation.

255

ERR_BAD_PARAMETER

The NetWare resource tag has an invalid signature.

Remarks

You must call the HttpClientOpen function once in your application before using any of the other functions in this interface. You use the handle returned by this function to open connections and to close the interface before your application quits.

See Also