HttpExtractSrcAddress

Returns the source address of the request in the specified format.

Syntax

    #include <httpexp.h>
    
    int HttpExtractSrcAddress (
       HINTERNET   hndl,
       int        *pSrcIPAddr,
       int        *pSrcIPPort,
       char       *pzSrcIPAddrBuf,
       char       *pzSrcPortBuf);
    

Parameters

hndl
(IN) Specifies the HTTP stack handle.
pSrcIPAddr
(OUT) If not NULL, points to a buffer for the IP address in binary format.
pSrcIPPort
(OUT) If not NULL, points to a buffer for the port address in binary format.
pzSrcIPAddrBuf
(OUT) If not NULL, points to a buffer for the IP address string in dotted decimal format.
pzSrcPortBuf
(IN) If not NULL, points to a buffer for the port address in decimal format.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code.

Decimal

Name

Description

255

ERR_BAD_PARAMETER

The hndl parameter is invalid.

Remarks

You only need to provide pointers for the values you need. The other parameters can be set to NULL.

See Also