Compartir a través de


HttpExtensionProc (Windows CE 5.0)

Send Feedback

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.

DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK* pECB);

Parameters

Return Values

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

Pocket PC: Pocket PC 2000 and later.
Smartphone: Smartphone 2002 and later.
OS Versions: Windows CE 3.0 and later.
Header: Httpext.h.
Link Library: Not applicable.

See Also

EXTENSION_CONTROL_BLOCK | WriteClient (ISAPI Extensions) | ServerSupportFunction (ISAPI Extensions)

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.