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.

93 lines
3.7 KiB

  1. //***************************************************************
  2. // macrohelper.h
  3. // Author: Russ Gibfried
  4. //***************************************************************
  5. /*** ChkAlloc macro : Allocates memory and checks for memalloc errors ***/
  6. #define ChkAlloc(var, init) \
  7. var = init; \
  8. if(var == NULL) \
  9. { \
  10. hr = E_OUTOFMEMORY; \
  11. }
  12. #define ChkAllocBstr(var, init) \
  13. var = init; \
  14. if(var.m_str == NULL) \
  15. { \
  16. hr = E_OUTOFMEMORY; \
  17. }
  18. //------------------------------------------------------------------------------
  19. // Global macros and constants
  20. //------------------------------------------------------------------------------
  21. #define TRACE_ENTER(x) ATLTRACE(_T("\t>>> Entering: %ls\n"), x)
  22. #define TRACE_EXIT(x) ATLTRACE(_T("\t<<< Leaving: %ls\n"), x)
  23. #define IIsScoLogFailure() \
  24. if (FAILED(hr)){ \
  25. WCHAR wszErrorDesc[1024]; \
  26. DWORD err = ::FormatMessage( FORMAT_MESSAGE_IGNORE_INSERTS | \
  27. FORMAT_MESSAGE_FROM_HMODULE | \
  28. FORMAT_MESSAGE_FROM_SYSTEM | 72, \
  29. g_ErrorModule, \
  30. hr, \
  31. 0, \
  32. wszErrorDesc, \
  33. sizeof(wszErrorDesc) / sizeof(wszErrorDesc[0]) - 1, \
  34. NULL ); \
  35. \
  36. AtlReportError(CLSID_IISSCO50, wszErrorDesc, __uuidof(IProvProvider), hr); \
  37. LocalFree(wszErrorDesc); \
  38. }
  39. //-----------------------------------------------------------------------------
  40. // Global SCO definitions
  41. //------------------------------------------------------------------------------
  42. // SCO xml nodes and elements
  43. #define XML_NODE_WEBSITE L"Website"
  44. #define XML_NODE_FTPSITE L"FTPsite"
  45. #define XML_NODE_VDIR L"VirtualDirectory"
  46. #define XML_NODE_PATHLIST L"PathList"
  47. #define XML_NODE_PROPERTYLIST L"PropertyList"
  48. #define XML_ELE_PROPERTY L"Property"
  49. #define XML_ATT_NUMBER L"number"
  50. #define XML_ATT_NAME L"name"
  51. #define XML_ATT_ISINHERITABLE L"isInheritable"
  52. // SCO rollback definitions
  53. #define IIS_ROLL_ADSPATH L"ADsPath"
  54. #define IIS_ROLL_SERVERNUMBER L"ServerNumber"
  55. #define IIS_ROLL_XNODE L"XML_NODE"
  56. #define IIS_ROLL_VNAME L"VDirName"
  57. // IIS commonly used definitions/values
  58. #define IIS_PREFIX L"IIS://"
  59. #define IIS_W3SVC L"/W3SVC"
  60. #define IIS_MSFTPSVC L"/MSFTPSVC"
  61. #define IIS_LOCALHOST L"LocalHost"
  62. #define IIS_VROOT L"ROOT"
  63. #define IIS_VDEFAULT_APP L"Default Application"
  64. // IIS services
  65. #define IIS_IISWEBSERVER L"IIsWebServer"
  66. #define IIS_IISFTPSERVER L"IIsFtpServer"
  67. #define IIS_IISWEBVIRTUALDIR L"IIsWebVirtualDir"
  68. #define IIS_FTPVDIR L"IIsFtpVirtualDir"
  69. // IIS numeric defaults -- max web sites, port number etc..
  70. #define IIS_SERVER_MAX 20000
  71. #define IIS_DEFAULT_WEB_PORT L"80"
  72. #define IIS_DEFAULT_FTP_PORT L"21"
  73. #define IIS_DEFAULT_APPISOLATED L"2"
  74. // True/False values
  75. #define IIS_FALSE L"FALSE"
  76. #define IIS_TRUE L"TRUE"