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.

117 lines
3.4 KiB

  1. extern "C"
  2. {
  3. // Definitions for code to find if an NT machine is in a domain
  4. #include <nt.h>
  5. #include <ntrtl.h>
  6. #include <nturtl.h>
  7. #include <ntlsa.h>
  8. }
  9. #include <windows.h>
  10. #include <windowsx.h>
  11. #include <wchar.h>
  12. #include <commctrl.h>
  13. #include <shellapi.h>
  14. #include <lm.h>
  15. #include <shlobj.h>
  16. #include <debug.h>
  17. #include <messages.h>
  18. #define ARRAYLEN(a) (sizeof(a) / sizeof((a)[0]))
  19. ////////////////////////////////////////////////////////////////////////////
  20. //
  21. // global variables
  22. //
  23. extern UINT g_NonOLEDLLRefs;
  24. extern HINSTANCE g_hInstance;
  25. //////////////////////////////////////////////////////////////////////////////
  26. //////////////////////////////////////////////////////////////////////////////
  27. //
  28. // Debugging stuff
  29. //
  30. //////////////////////////////////////////////////////////////////////////////
  31. //////////////////////////////////////////////////////////////////////////////
  32. //
  33. // Fix the warning levels
  34. //
  35. #pragma warning(3:4092) // sizeof returns 'unsigned long'
  36. #pragma warning(3:4121) // structure is sensitive to alignment
  37. #pragma warning(3:4125) // decimal digit in octal sequence
  38. #pragma warning(3:4130) // logical operation on address of string constant
  39. #pragma warning(3:4132) // const object should be initialized
  40. #pragma warning(4:4200) // nonstandard zero-sized array extension
  41. #pragma warning(4:4206) // Source File is empty
  42. #pragma warning(3:4208) // delete[exp] - exp evaluated but ignored
  43. #pragma warning(3:4212) // function declaration used ellipsis
  44. #pragma warning(3:4220) // varargs matched remaining parameters
  45. #pragma warning(4:4509) // SEH used in function w/ _trycontext
  46. #pragma warning(error:4700) // Local used w/o being initialized
  47. #pragma warning(3:4706) // assignment w/i conditional expression
  48. #pragma warning(3:4709) // command operator w/o index expression
  49. //////////////////////////////////////////////////////////////////////////////
  50. #if DBG == 1
  51. DECLARE_DEBUG(NetObjectsUI)
  52. #define appDebugOut(x) NetObjectsUIInlineDebugOut x
  53. #define appAssert(x) Win4Assert(x)
  54. #define CHECK_HRESULT(hr) \
  55. if ( FAILED(hr) ) \
  56. { \
  57. appDebugOut((DEB_IERROR, \
  58. "**** ERROR RETURN <%s @line %d> -> 0x%08lx\n", \
  59. __FILE__, __LINE__, hr)); \
  60. }
  61. #define CHECK_NEW(p) \
  62. if ( NULL == (p) ) \
  63. { \
  64. appDebugOut((DEB_IERROR, \
  65. "**** NULL POINTER (OUT OF MEMORY!) <%s @line %d>\n", \
  66. __FILE__, __LINE__)); \
  67. }
  68. #define CHECK_NULL(p) \
  69. if ( NULL == (p) ) \
  70. { \
  71. appDebugOut((DEB_IERROR, \
  72. "**** NULL POINTER <%s @line %d>: %s\n", \
  73. __FILE__, __LINE__, #p)); \
  74. }
  75. #define CHECK_THIS appAssert(NULL != this && "'this' pointer is NULL")
  76. #define DECLARE_SIG ULONG __sig
  77. #define INIT_SIG(class) __sig = SIG_##class
  78. #define CHECK_SIG(class) \
  79. appAssert((NULL != this) && "'this' pointer is NULL"); \
  80. appAssert((SIG_##class == __sig) && "Signature doesn't match")
  81. #else // DBG == 1
  82. #define appDebugOut(x)
  83. #define appAssert(x)
  84. #define CHECK_HRESULT(hr)
  85. #define CHECK_NEW(p)
  86. #define CHECK_NULL(p)
  87. #define CHECK_THIS
  88. #define DECLARE_SIG
  89. #define INIT_SIG(class)
  90. #define CHECK_SIG(class)
  91. #endif // DBG == 1
  92. #if DBG == 1
  93. #define SIG_CNetObj 0xabcdef00
  94. #define SIG_CPage 0xabcdef01
  95. #endif // DBG == 1