CHttpServer::PreProcessEvent Method  
 
virtual LONG PreProcessEvent(
  HSERVER hServer,  
  UINT nClientId,  
  UINT nEventId,  
  DWORD dwError,  
  BOOL& bHandled  
);

A virtual method that is invoked for each event generated by the server.

Parameters

hServer
The server handle. The application should treat this as an opaque value that is only valid as long as the server is active. This value should not be stored by the application and the handle value will change if the server is restarted.
nClientId
An unsigned integer which uniquely identifies the client that has issued a request to the server. This value is guaranteed to be unique to the client session throughout the life of the server and is never reused. The application should never make assumptions about the order in which IDs are allocated to the client sessions.
nEventId
An unsigned integer which specifies which event occurred. For a list of events, see Server Event Constants.
dwError
An unsigned integer which specifies any error that occurred. If no error occurred, then this parameter will be zero.
bHandled
An integer which specifies if the event has been handled by the application. If this parameter is set to a non-zero value, the default event handler will not be invoked for the event.

Return Value

The method should return a value of zero to indicate that the default event handler should be invoked for the event. If the method returns a non-zero value, this value is passed back to the event dispatcher and the default handler will not be invoked.

Remarks

The PreProcessEvent method is invoked for each event that is generated, prior to the default handler for that event. To implement an event handler, the application should create a class derived from the CHttpServer class, and then override this method.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtsv12.lib