HttpSendErrorPackageResponse

Sends an HTTP error code and an HTML reply.

Syntax

    #include <httpexp.h>
    
    int HttpSendErrorPackageResponse (
       HINTERNET   hndl,
       UINT32      HTTP_ERROR_CODE,
       void       *pData,
       UINT32      szData);
    

Parameters

hndl
(IN) Specifies the HTTP stack handle.
HTTP_ERROR_CODE
(IN) Specifies the error code to send. For possible values, see Section 6.1, HTTP Status Codes.
pData
(IN) Points to the data to send.
szData
(IN) Specifies the size of the data to send.

Return Values

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

Decimal

Name

Description

153

ERR_DIRECTORY_FULL

The call was made out of sequence.

168

ERR_ACCESS_DENIED

The call was made out of sequence. The response has already been sent.

255

ERR_BAD_PARAMETER

A bad parameter was passed to the function.

Remarks

The HttpSendErrorPackageResponse function allows you to reply with a single call when an error condition occurs.

See Also