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.

134 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. common.h
  5. Abstract:
  6. Common properties header file
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. 2/17/2000 sergeia removed dependency on MFC
  14. --*/
  15. #ifndef __COMPROP_H__
  16. #define __COMPROP_H__
  17. #include <lmcons.h>
  18. #include <wincrypt.h>
  19. #include <iis64.h>
  20. #include "inetcom.h"
  21. #include "iisinfo.h"
  22. #include "svcloc.h"
  23. #include "resource.h"
  24. #ifndef _DLLEXP
  25. #define _EXPORT __declspec(dllimport)
  26. #else
  27. #define _EXPORT __declspec(dllexport)
  28. #endif
  29. //
  30. // Memory Allocation Macros
  31. //
  32. //#define AllocMem(cbSize)\
  33. // ::LocalAlloc(LPTR, cbSize)
  34. //#define FreeMem(lp)\
  35. // ::LocalFree(lp)
  36. //#define AllocMemByType(citems, type)\
  37. // (type *)AllocMem(citems * sizeof(type))
  38. //
  39. // Program flow macros
  40. //
  41. #define FOREVER for(;;)
  42. #define BREAK_ON_ERR_FAILURE(err)\
  43. if (err.Failed()) break;
  44. #define BREAK_ON_NULL_PTR(lp)\
  45. if (lp == NULL) break;
  46. #define BREAK_ON_FAILURE(hr)\
  47. if (FAILED(hr)) break
  48. //
  49. // Safe allocators
  50. //
  51. #define SAFE_DELETE(obj)\
  52. if (obj != NULL) do { delete obj; obj = NULL; } while(0)
  53. #define SAFE_DELETE_OBJECT(obj)\
  54. if (obj != NULL) do { DeleteObject(obj); obj = NULL; } while(0)
  55. #define SAFE_FREEMEM(lp)\
  56. if (lp != NULL) do { FreeMem(lp); lp = NULL; } while(0)
  57. #define SAFE_SYSFREESTRING(lp)\
  58. if (lp != NULL) do { ::SysFreeString(lp); lp = NULL; } while(0)
  59. #define SAFE_RELEASE(lpInterface)\
  60. if (lpInterface != NULL) do { lpInterface->Release(); lpInterface = NULL; } while(0)
  61. #define IS_NETBIOS_NAME(lpstr) (*lpstr == _T('\\'))
  62. //
  63. // Return the portion of a computer name without the backslashes
  64. //
  65. #define PURE_COMPUTER_NAME(lpstr) (IS_NETBIOS_NAME(lpstr) ? lpstr + 2 : lpstr)
  66. #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
  67. #define STRSIZE(str) (ARRAY_SIZE(str)-1)
  68. #define ARRAY_BYTES(a) (sizeof(a) * sizeof(a[0]))
  69. #define STRBYTES(str) (ARRAY_BYTES(str) - sizeof(str[0]))
  70. //
  71. // General purpose files
  72. //
  73. #include "iiscstring.h"
  74. typedef IIS::CString CString;
  75. #include "debugatl.h"
  76. #include "utcls.h"
  77. //#include "objplus.h"
  78. //#include "strfn.h"
  79. //#include "odlbox.h"
  80. #include "error.h"
  81. #include "mdkeys.h"
  82. //#include "ipa.h"
  83. //#include "wizard.h"
  84. //#include "registry.h"
  85. //#include "ddxv.h"
  86. //#include "objpick.h"
  87. //#include "accentry.h"
  88. //#include "sitesecu.h"
  89. //#include "ipctl.h"
  90. //#include "dtp.h"
  91. //#include "dirbrows.h"
  92. #include "FileChooser.h"
  93. #endif // __COMPROP_H__