[0001] [0002] [0003] [0004] [0005] [0006] [0007] [0008] [0009] [0010] [0011] [0012] [0013] [0014] [0015] [0016] [0017] [0018] [0019] [0020] [0021] [0022] [0023] [0024] [0025] [0026] [0027] [0028] [0029] [0030] [0031] [0032] [0033] [0034] [0035] [0036] [0037] [0038] [0039] [0040] [0041] [0042] [0043] [0044] [0045] [0046] [0047] [0048] [0049] [0050] [0051] [0052] [0053] [0054] [0055] [0056] [0057] [0058] [0059] [0060] [0061] [0062] [0063] [0064] [0065] [0066] [0067] [0068] [0069] [0070] [0071] [0072] [0073] [0074] [0075] [0076] [0077] [0078] [0079] [0080] [0081] [0082] [0083] [0084] [0085] [0086] [0087] [0088] [0089] [0090] [0091] [0092] [0093] [0094] [0095] [0096] [0097] [0098] [0099] [0100] [0101] [0102] [0103] [0104] [0105] [0106] [0107] [0108] [0109] [0110] [0111] [0112] [0113] [0114] [0115] [0116] [0117] [0118] [0119] [0120]
/*****************************************************************************/ /* CGISAPI.H 20-NOV-1999 MGD add HSE_REQ_DLL_WRITE_BUFFER_SIZE 14-MAR-1999 MGD initial */ /*****************************************************************************/ /* definitions that normally come from <windows.h> */ #define CONST const #define CHAR char #define BYTE char #define WORD short #define BOOL unsigned int #define DWORD unsigned long int #define LPDWORD DWORD* #define LPBYTE BYTE* #define WINAPI typedef void* LPVOID; typedef char* LPSTR; /* ISAPI header information */ #define HSE_VERSION_MAJOR 1 /* major version */ #define HSE_VERSION_MINOR 0 /* minor version */ #define HSE_LOG_BUFFER_LEN 80 #define HSE_MAX_EXT_DLL_NAME_LEN 256 typedef LPVOID HCONN; /* status codes returned by the Extension DLL */ #define HSE_STATUS_SUCCESS 1 #define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2 #define HSE_STATUS_PENDING 3 #define HSE_STATUS_ERROR 4 /* values to request services with the ServerSupportFunction() (0 to 1000 are reserved for future versions of the interface) */ #define HSE_REQ_BASE 0 #define HSE_REQ_SEND_URL_REDIRECT_RESP (HSE_REQ_BASE+1) #define HSE_REQ_SEND_URL (HSE_REQ_BASE+2) #define HSE_REQ_SEND_RESPONSE_HEADER (HSE_REQ_BASE+3) #define HSE_REQ_DONE_WITH_SESSION (HSE_REQ_BASE+4) #define HSE_REQ_END_RESERVED 1000 /* WASD CGIsapi DLL debug extensions */ #define HSE_REQ_DLL_DEBUG_ON (HSE_REQ_END_RESERVED+1001) #define HSE_REQ_DLL_DEBUG_OFF (HSE_REQ_END_RESERVED+1002) #define HSE_REQ_DLL_WRITE_BUFFER_SIZE (HSE_REQ_END_RESERVED+1003) /* structure for GetExtensionVersion() */ typedef struct _HSE_VERSION_INFO { DWORD dwExtensionVersion; CHAR lpszExtensionDesc[HSE_MAX_EXT_DLL_NAME_LEN]; } HSE_VERSION_INFO, *LPHSE_VERSION_INFO; /* structure for extension procedure on a new request */ typedef struct _EXTENSION_CONTROL_BLOCK { DWORD cbSize; /* size of this structure */ DWORD dwVersion; /* ISAPI version */ HCONN ConnID; /* context ... not to be modified! */ DWORD dwHttpStatusCode; /* HTTP status code */ CHAR lpszLogData [HSE_LOG_BUFFER_LEN]; /* null terminated log info */ LPSTR lpszMethod; /* REQUEST_METHOD */ LPSTR lpszQueryString; /* QUERY_STRING */ LPSTR lpszPathInfo; /* PATH_INFO */ LPSTR lpszPathTranslated; /* PATH_TRANSLATED */ DWORD cbTotalBytes; /* CONTENT_LENGTH */ DWORD cbAvailable; /* bytes available in 'lpbData' */ LPBYTE lpbData; /* pointer to 'cbAvailable' bytes */ LPSTR lpszContentType; /* CONTENT_TYPE */ /* callback function */ BOOL (WINAPI * GetServerVariable)(HCONN hConn, LPSTR lpszVariableName, LPVOID lpvBuffer, LPDWORD lpdwSize); /* callback function */ BOOL (WINAPI* WriteClient)(HCONN ConnID, LPVOID Buffer, LPDWORD lpdwBytes, DWORD dwReserved); /* callback function */ BOOL (WINAPI* ReadClient)(HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize); /* callback function */ BOOL (WINAPI* ServerSupportFunction)(HCONN hConn, DWORD dwHSERRequest, LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType); } EXTENSION_CONTROL_BLOCK, *LPEXTENSION_CONTROL_BLOCK; /* prototypes for functions that must be exported from the extension DLL */ BOOL WINAPI GetExtensionVersion (HSE_VERSION_INFO *pVer); DWORD WINAPI HttpExtensionProc (EXTENSION_CONTROL_BLOCK *pECB); /*****************************************************************************/