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.

103 lines
1.9 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>
  16. // Exit codes
  17. #define EXIT_BADSC 1
  18. #define EXIT_OOM 2
  19. #define EXIT_UNKNOWN 3
  20. #define STR(x) OLESTR(x)
  21. #ifdef UNICODE
  22. #ifndef ATOT
  23. #define ATOT(psz, ptcs, max) mbstowcs(ptcs, psz, max)
  24. #endif
  25. #ifndef TTOA
  26. #define TTOA(ptcs, psz, max) wcstombs(psz, ptcs, max)
  27. #endif
  28. #else
  29. #ifndef ATOT
  30. #define ATOT(psz, ptcs) strcpy(ptcs, psz)
  31. #endif
  32. #ifndef TTOA
  33. #define TTOA(ptcs, psz) strcpy(psz, ptcs)
  34. #endif
  35. #endif
  36. #ifdef OLEWIDECHAR
  37. //typedef WCHAR TCHAR;
  38. #ifndef ATOOLE
  39. #define ATOOLE(psz, ptcs, max) mbstowcs(ptcs, psz, max)
  40. #endif
  41. #ifndef OLETOA
  42. i#define OLETOA(ptcs, psz, max) wcstombs(psz, ptcs, max)
  43. #endif
  44. #ifndef olecscmp
  45. #define olecscmp wcscmp
  46. #endif
  47. #ifndef olecscpy
  48. #define olecscpy wcscpy
  49. #endif
  50. #ifndef olecslen
  51. #define olecslen wcslen
  52. #endif
  53. #ifndef olecsprintf
  54. #define olecsprintf swprintf
  55. #endif
  56. #else
  57. typedef char TCHAR;
  58. #ifndef ATOOLE
  59. #define ATOOLE(psz, ptcs) strcpy(ptcs, psz)
  60. #endif
  61. #ifndef OLETOA
  62. #define OLETOA(ptcs, psz) strcpy(psz, ptcs)
  63. #endif
  64. #ifndef olecscmp
  65. #define olecscmp strcmp
  66. #endif
  67. #ifndef olecscpy
  68. #define olecscpy strcpy
  69. #endif
  70. #ifndef olecslen
  71. #define olecslen strlen
  72. #endif
  73. #ifndef olecsprintf
  74. #define olecsprintf sprintf
  75. #endif
  76. #endif
  77. #define DRTDF atcDrtDocfile
  78. #define MARSHALDF STR("dup.dfl")
  79. #define ROOTP(x) ((x) | dwTransacted | dwRootDenyWrite)
  80. #define STGP(x) ((x) | dwTransacted | STGM_SHARE_EXCLUSIVE)
  81. #define STMP(x) ((x) | STGM_SHARE_EXCLUSIVE)
  82. extern DWORD dwTransacted, dwRootDenyWrite;
  83. extern BOOL fVerbose;
  84. extern OLECHAR atcDrtDocfile[];
  85. #endif // #ifndef __DRT_HXX__