Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
4.4 KiB

  1. /********
  2. *
  3. * Copyright (c) 1995 Process Software Corporation
  4. *
  5. * Copyright (c) 1995 Microsoft Corporation
  6. *
  7. *
  8. * Module Name : HttpExt.h
  9. *
  10. * Abstract :
  11. *
  12. * This module contains the structure definitions and prototypes for the
  13. * version 1.0 HTTP Server Extension interface.
  14. *
  15. ******************/
  16. #ifndef _HTTPEXT_H_
  17. #define _HTTPEXT_H_
  18. #include <windows.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #define HSE_VERSION_MAJOR 1 // major version of this spec
  23. #define HSE_VERSION_MINOR 0 // minor version of this spec
  24. #define HSE_LOG_BUFFER_LEN 80
  25. #define HSE_MAX_EXT_DLL_NAME_LEN 256
  26. typedef LPVOID HCONN;
  27. // the following are the status codes returned by the Extension DLL
  28. #define HSE_STATUS_SUCCESS 1
  29. #define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2
  30. #define HSE_STATUS_PENDING 3
  31. #define HSE_STATUS_ERROR 4
  32. // The following are the values to request services with the ServerSupportFunction.
  33. // Values from 0 to 1000 are reserved for future versions of the interface
  34. #define HSE_REQ_BASE 0
  35. #define HSE_REQ_SEND_URL_REDIRECT_RESP ( HSE_REQ_BASE + 1 )
  36. #define HSE_REQ_SEND_URL ( HSE_REQ_BASE + 2 )
  37. #define HSE_REQ_SEND_RESPONSE_HEADER ( HSE_REQ_BASE + 3 )
  38. #define HSE_REQ_DONE_WITH_SESSION ( HSE_REQ_BASE + 4 )
  39. #define HSE_REQ_END_RESERVED 1000
  40. //
  41. // These are Microsoft specific extensions
  42. //
  43. #define HSE_REQ_MAP_URL_TO_PATH (HSE_REQ_END_RESERVED+1)
  44. #define HSE_REQ_GET_SSPI_INFO (HSE_REQ_END_RESERVED+2)
  45. //
  46. // passed to GetExtensionVersion
  47. //
  48. typedef struct _HSE_VERSION_INFO {
  49. DWORD dwExtensionVersion;
  50. CHAR lpszExtensionDesc[HSE_MAX_EXT_DLL_NAME_LEN];
  51. } HSE_VERSION_INFO, *LPHSE_VERSION_INFO;
  52. //
  53. // passed to extension procedure on a new request
  54. //
  55. typedef struct _EXTENSION_CONTROL_BLOCK {
  56. DWORD cbSize; // size of this struct.
  57. DWORD dwVersion; // version info of this spec
  58. HCONN ConnID; // Context number not to be modified!
  59. DWORD dwHttpStatusCode; // HTTP Status code
  60. CHAR lpszLogData[HSE_LOG_BUFFER_LEN];// null terminated log info specific to this Extension DLL
  61. LPSTR lpszMethod; // REQUEST_METHOD
  62. LPSTR lpszQueryString; // QUERY_STRING
  63. LPSTR lpszPathInfo; // PATH_INFO
  64. LPSTR lpszPathTranslated; // PATH_TRANSLATED
  65. DWORD cbTotalBytes; // Total bytes indicated from client
  66. DWORD cbAvailable; // Available number of bytes
  67. LPBYTE lpbData; // pointer to cbAvailable bytes
  68. LPSTR lpszContentType; // Content type of client data
  69. BOOL (WINAPI * GetServerVariable) ( HCONN hConn,
  70. LPSTR lpszVariableName,
  71. LPVOID lpvBuffer,
  72. LPDWORD lpdwSize );
  73. BOOL (WINAPI * WriteClient) ( HCONN ConnID,
  74. LPVOID Buffer,
  75. LPDWORD lpdwBytes,
  76. DWORD dwReserved );
  77. BOOL (WINAPI * ReadClient) ( HCONN ConnID,
  78. LPVOID lpvBuffer,
  79. LPDWORD lpdwSize );
  80. BOOL (WINAPI * ServerSupportFunction)( HCONN hConn,
  81. DWORD dwHSERRequest,
  82. LPVOID lpvBuffer,
  83. LPDWORD lpdwSize,
  84. LPDWORD lpdwDataType );
  85. } EXTENSION_CONTROL_BLOCK, *LPEXTENSION_CONTROL_BLOCK;
  86. //
  87. // these are the prototypes that must be exported from the extension DLL
  88. //
  89. BOOL WINAPI GetExtensionVersion( HSE_VERSION_INFO *pVer );
  90. DWORD WINAPI HttpExtensionProc( EXTENSION_CONTROL_BLOCK *pECB );
  91. // the following type declarations is for the server side
  92. typedef BOOL (WINAPI * PFN_GETEXTENSIONVERSION)( HSE_VERSION_INFO *pVer );
  93. typedef DWORD (WINAPI * PFN_HTTPEXTENSIONPROC )( EXTENSION_CONTROL_BLOCK *pECB );
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97. #endif // end definition _HTTPEXT_H_
  98.