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
2.2 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: drt.hxx
  7. //
  8. // Contents: DRT header
  9. //
  10. // History: 22-Sep-92 DrewB Created
  11. //
  12. //---------------------------------------------------------------
  13. #ifndef __DRT_HXX__
  14. #define __DRT_HXX__
  15. //#include <dfmsp.hxx> // remove dependency on internal header file
  16. #define OLEWIDECHAR
  17. #define DfGetScode(hr) GetScode(hr)
  18. typedef DWORD LPSTGSECURITY;
  19. // [later] typedef LPSECURITY_ATTRIBUTES LPSTGSECURITY;
  20. #define ULIGetLow(li) ((li).LowPart)
  21. #define ULIGetHigh(li) ((li).HighPart)
  22. // Exit codes
  23. #define EXIT_BADSC 1
  24. #define EXIT_OOM 2
  25. #define EXIT_UNKNOWN 3
  26. #define STR(x) OLESTR(x)
  27. #ifdef UNICODE
  28. #ifndef ATOT
  29. #define ATOT(psz, ptcs, max) mbstowcs(ptcs, psz, max)
  30. #endif
  31. #ifndef TTOA
  32. #define TTOA(ptcs, psz, max) wcstombs(psz, ptcs, max)
  33. #endif
  34. #else
  35. #ifndef ATOT
  36. #define ATOT(psz, ptcs) strcpy(ptcs, psz)
  37. #endif
  38. #ifndef TTOA
  39. #define TTOA(ptcs, psz) strcpy(psz, ptcs)
  40. #endif
  41. #endif
  42. #ifdef OLEWIDECHAR
  43. //typedef WCHAR TCHAR;
  44. #ifndef ATOOLE
  45. #define ATOOLE(psz, ptcs, max) mbstowcs(ptcs, psz, max)
  46. #endif
  47. #ifndef OLETOA
  48. #define OLETOA(ptcs, psz, max) wcstombs(psz, ptcs, max)
  49. #endif
  50. #ifndef olecscmp
  51. #define olecscmp wcscmp
  52. #endif
  53. #ifndef olecscpy
  54. #define olecscpy wcscpy
  55. #endif
  56. #ifndef olecslen
  57. #define olecslen wcslen
  58. #endif
  59. #ifndef olecsprintf
  60. #define olecsprintf swprintf
  61. #endif
  62. #else
  63. typedef char TCHAR;
  64. #ifndef ATOOLE
  65. #define ATOOLE(psz, ptcs) strcpy(ptcs, psz)
  66. #endif
  67. #ifndef OLETOA
  68. #define OLETOA(ptcs, psz) strcpy(psz, ptcs)
  69. #endif
  70. #ifndef olecscmp
  71. #define olecscmp strcmp
  72. #endif
  73. #ifndef olecscpy
  74. #define olecscpy strcpy
  75. #endif
  76. #ifndef olecslen
  77. #define olecslen strlen
  78. #endif
  79. #ifndef olecsprintf
  80. #define olecsprintf sprintf
  81. #endif
  82. #endif
  83. #define DRTDF atcDrtDocfile
  84. #define MARSHALDF STR("dup.dfl")
  85. #define ROOTP(x) ((x) | dwTransacted | dwRootDenyWrite)
  86. #define STGP(x) ((x) | dwTransacted | STGM_SHARE_EXCLUSIVE)
  87. #define STMP(x) ((x) | STGM_SHARE_EXCLUSIVE)
  88. extern DWORD dwTransacted, dwRootDenyWrite;
  89. extern BOOL fVerbose;
  90. extern BOOL fOfs;
  91. extern OLECHAR atcDrtDocfile[];
  92. #endif // #ifndef __DRT_HXX__