Call this member function to provide the ISA with some general purpose functions as well as functions that are specific to HTTP server implementation.
BOOL ServerSupportFunction( DWORD dwHSERRequest, LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType );
An HTTP Server Extension value. See the Remarks section for a list of the supported values.
When used with HSE_REQ_SEND_RESPONSE_HEADER, it points to a null terminated optional status string (for example, "401 Access Denied"). If this buffer is null, a default response of "200 OK" will be sent by this function. When used with HSE_REQ_DONE_WITH_SESSION, it points to a DWORD indicating the status code of the request.
When used with HSE_REQ_SEND_RESPONSE_HEADER, it points to the size of the buffer lpdwDataType.
When used with HSE_REQ_SEND_RESPONSE_HEADER, this is a null-terminated string pointing to optional headers or data to be appended and sent with the header. If this is NULL, the header will be terminated by a "\r\n" pair.
General purpose functions should have a dwHSERequest value larger than HSE_REQ_END_RESERVED. Values up to HSE_REQ_END_RESERVED are reserved for mandatory ServerSupportFunctions and should not be used.
The HTTP Server Extension value represented by dwHSERRequest can be one of the following:
Sends a 302(URL Redirect) message to the client. No further processing is needed after the call. This operation is similar to specifying "URI: <URL>" in a CGI script header. The variable lpvBuffer should point to a null terminated URL string. Variable lpdwSize should have the size of lpvBuffer. Variable lpdwDataType is ignored.
Sends the data specified by the URL to the client as if the client had requested that URL. The Null terminated URL pointed to by lpvBuffer MUST be on the server and must not specify protocol information (i.e. it must begin with a '/' ). No further processing is required after this call. Variable lpdwSize points to a DWORD holding the size of lpvBuffer. Variable lpdwDataType is ignored.
Sends a complete HTTP server response header including the status, server version, message time and MIME version. The ISA or server extension should append other HTTP headers at the end such as the Content-Type, Content-Length, and so forth, followed by an extra "\r\n".
If the ISA or server extension wants to hold onto the session because it has extended processing requirements, it needs to tell the server when the session is finished so the server can close it and free the related structures. Variables lpvBuffer, lpdwSize, and lpdwDataType are all ignored.
Functions higher than this value are server specific and may not be available on all web servers that support ISAPI.
The lpvBuffer parameter is a pointer to the buffer that contains the logical path on entry and the physical path on exit. The lpdwSize parameter is a pointer to the DWORD containing the size of the buffer passed in lpvBuffer on entry, and the number of bytes placed in the buffer on exit. The lpdwDataType parameter is ignored). A Microsoft-specific extension.
The lpvBuffer is filled in with the context handle and *lpdwDataType is filled in with the credential handle. A context handle specifies a pointer type or a type identifier. A credential handle specifies authentication and authorization.
See TransmitFile for an easier method of transmitting a file to a requester.
The server does not ensure that the buffers are large enough before filling in the handles, and lpdwSize is not updated to reflect the amount of data copied into the lpvBuffer buffer. Since these are fixed size structures, it is assumed the pointers passed in are pointers to the structure and must be at least as large as the request structures.