HttpSendErrorResponse

Sends a complete Header & Data session back to the client with the supplied HTTP status code.

Syntax

    #include <httpexp.h>
    
    int HttpSendErrorResponse (
      HINTERNET    hndl,
      UINT32       HTTP_ERROR_CODE);
    

Parameters

hndl
(IN) Specifies the HTTP stack handle.
HTTP_ERROR_CODE
(IN) Specifies a value which contains the HTTP Status Code to use. See Section 6.1, HTTP Status Codes.

Return Values

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

Decimal

Name

Description

255

ERR_BAD_PARAMETER

Invalid handle.