Share via


HttpExtensionProc (Windows Embedded CE 6.0)

1/6/2010

This function is an application-defined function. It is the main entry point for an ISAPI extension called by the Web Server. The Web Server calls this function to give the ISAPI extensions DLL control of the processing. ISAPI extensions export this function to expose methods that the Web Server uses to access the functionality exposed by the extension. The HttpExtensionProc name for this function is a placeholder for the function name defined by the header.

Syntax

DWORD WINAPI HttpExtensionProc(
  EXTENSION_CONTROL_BLOCK* pECB
);

Parameters

Return Value

Returns a DWORD status code. The following table shows the possible return values.

Value Description

HSE_STATUS_SUCCESS

The extension has finished processing and the server should disconnect the client and free up allocated resources.

HSE_STATUS_SUCCESS_AND_KEEP_CONN

The extension has finished processing and the server should wait for the next HTTP request if the client supports Keep-Alive connections. The extension can return this only if it was able to send the correct Content-Length header to the client.

HSE_STATUS_PENDING

This option is not supported in the Web Server.

HSE_STATUS_ERROR

The extension has encountered an error while processing the request, so the server can disconnect the client and free up allocated resources. An HTTP status code of 500 is written to the Web Server log for the request.

Remarks

This entry point function is similar to a main function in a C/C++ program. The code in this function uses callback functions in the EXTENSION_CONTROL_BLOCK to read client data and decide which action to take. Before returning to the server, a properly formatted response must be sent to the client through either WriteClient (ISAPI Extensions) or ServerSupportFunction (ISAPI Extensions). Return codes are defined in Httpext.h.

Important

The Web Server performs a keep-alive operation if ISAPI extension returns HSE_STATUS_SUCCESS_AND_KEEP_CONN.

Requirements

Header httpext.h
Library Developer Implemented
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Web Server Functions
EXTENSION_CONTROL_BLOCK
WriteClient (ISAPI Extensions)
ServerSupportFunction (ISAPI Extensions)