Leaked source code of windows server 2003
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.

110 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. mshtmsvr.h
  5. Abstract:
  6. This header file declares the API for connecting IIS to MSHTML.DLL
  7. Authors:
  8. Anand Ramakrishna (anandra)
  9. Dmitry Robsman (dmitryr)
  10. Revision History:
  11. --*/
  12. #ifndef _MSHTMSVR_H_
  13. #define _MSHTMSVR_H_
  14. //
  15. // Callback definitions
  16. //
  17. //
  18. typedef BOOL
  19. (WINAPI *PFN_SVR_WRITER_CALLBACK)(
  20. VOID *pvSvrContext, // [in] passed to GetDLText
  21. void *pvBuffer, // [in] data
  22. DWORD cbBuffer // [in] data length (bytes)
  23. );
  24. typedef BOOL
  25. (WINAPI *PFN_SVR_MAPPER_CALLBACK)(
  26. VOID *pvSvrContext, // [in] passed to GetDLText
  27. CHAR *pchVirtualFileName, // [in] virtual file name to map
  28. CHAR *pchPhysicalFilename, // [in, out] physical file name
  29. DWORD cchMax // [in] buffer size
  30. );
  31. typedef BOOL
  32. (WINAPI *PFN_SVR_GETINFO_CALLBACK)(
  33. VOID *pvSvrContext, // [in] passed to GetDLText
  34. DWORD dwInfo, // [in] One of the SVRINFO_XXXX contants
  35. CHAR *pchBuffer, // [in, out] buffer
  36. DWORD cchMax // [in] buffer size
  37. );
  38. //
  39. // Constants for GETINFO callback
  40. //
  41. // Example http://host/page.htm?a=v
  42. #define SVRINFO_PROTOCOL 1 // SERVER_PROTOCOL HTTP/1.1
  43. #define SVRINFO_HOST 2 // SERVER_NAME host
  44. #define SVRINFO_PATH 3 // PATH_INFO /page.htm
  45. #define SVRINFO_PATH_TRANSLATED 4 // PATH_TRANSLATED c:\wwwroot\page.htm
  46. #define SVRINFO_QUERY_STRING 5 // QUERY_STRING a=v
  47. #define SVRINFO_PORT 6 // SERVER_PORT 80
  48. #define SVRINFO_METHOD 7 // REQUEST_METHOD GET
  49. #define SVRINFO_USERAGENT 8 // HTTP_USER_AGENT Mozilla/4.0 ...
  50. //
  51. // Constants for Normalized User Agent
  52. //
  53. #define USERAGENT_RESERVED 0xffffffff
  54. #define USERAGENT_DEFAULT 0
  55. #define USERAGENT_IE3 1
  56. #define USERAGENT_IE4 2
  57. #define USERAGENT_NAV5 3
  58. #define USERAGENT_NAV4 4
  59. #define USERAGENT_NAV3 5
  60. #define USERAGENT_IE5 10000
  61. //
  62. // The API
  63. //
  64. //
  65. #ifdef __cplusplus
  66. extern "C" {
  67. #endif
  68. BOOL WINAPI
  69. SvrTri_NormalizeUA(
  70. CHAR *pchUA, // [in] User agent string
  71. DWORD *pdwUA // [out] User agend id
  72. );
  73. BOOL WINAPI
  74. SvrTri_GetDLText(
  75. VOID *pvSrvContext, // [in] Server Context
  76. DWORD dwUA, // [in] User Agent (Normalized)
  77. CHAR *pchFileName, // [in] Physical file name of htm file
  78. IDispatch *pdisp, // [in] OA 'Server' object for scripting
  79. PFN_SVR_GETINFO_CALLBACK pfnInfo, // [in] GetInfo callback
  80. PFN_SVR_MAPPER_CALLBACK pfnMapper, // [in] Mapper callback
  81. PFN_SVR_WRITER_CALLBACK pfnWriter, // [in] Writer callback
  82. DWORD *rgdwUAEquiv, // [in, out] Array of ua equivalences
  83. DWORD cUAEquivMax, // [in] Size of array of ua equiv
  84. DWORD *pcUAEquiv // [out] # of UA Equivalencies filled in
  85. );
  86. #ifdef __cplusplus
  87. };
  88. #endif
  89. #endif // _MSHTMSVR_H_
  90. /************************ End of File ***********************/