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.

139 lines
2.4 KiB

  1. /*++
  2. Module Name:
  3. stdafx.h
  4. Abstract:
  5. Include file for standard system include files,
  6. Or project specific include files that are used frequently, but are
  7. changed infrequently
  8. --*/
  9. #if !defined(AFX_STDAFX_H__D8861A25_3343_11D1_BE3D_00A024DFD45D__INCLUDED_)
  10. #define AFX_STDAFX_H__D8861A25_3343_11D1_BE3D_00A024DFD45D__INCLUDED_
  11. #if _MSC_VER >= 1000
  12. #pragma once
  13. #pragma warning (disable: 4706 4100)
  14. #endif // _MSC_VER >= 1000
  15. #define STRICT
  16. #define _ATL_APARTMENT_THREADED
  17. #include <atlbase.h>
  18. //You may derive a class from CComModule and use it if you want to override
  19. //something, but do not change the name of _Module
  20. extern CComModule _Module;
  21. #include <shellapi.h>
  22. #include <atlcom.h>
  23. #include <atlwin.h>
  24. #include <commctrl.h> // For using the TreeView(TV).
  25. #include <shfusion.h>
  26. #include "DfsCore_i.c"
  27. #if __RPCNDR_H_VERSION__ < 440
  28. #define __RPCNDR_H_VERSION__ 440
  29. #define MIDL_INTERFACE(x) interface
  30. #endif
  31. #include "dfsDebug.h"
  32. #include <mmc.h>
  33. #define DFS_NAME_COLUMN_WIDTH 250
  34. typedef enum _NODETYPE
  35. {
  36. UNASSIGNED = 0,
  37. TRUSTED_DOMAIN,
  38. DOMAIN_DFSROOTS,
  39. ALL_DFSROOTS,
  40. FTDFS,
  41. SADFS
  42. } NODETYPE;
  43. /////////////////////////////////////////////////////////////////////////////
  44. // Inline methods
  45. template<class TYPE>
  46. inline void SAFE_RELEASE(TYPE*& pObj)
  47. {
  48. if (NULL != pObj)
  49. {
  50. try
  51. {
  52. pObj->Release();
  53. pObj = NULL;
  54. }
  55. catch(...)
  56. {
  57. pObj = NULL;
  58. }
  59. }
  60. else
  61. {
  62. ATLTRACE(_T("SAFE_RELEASE: called on NULL interface ptr\n"));
  63. }
  64. }
  65. template<class TYPE>
  66. inline void SAFE_DELETE(TYPE*& pObj)
  67. {
  68. if (NULL != pObj)
  69. {
  70. try
  71. {
  72. delete pObj;
  73. pObj = NULL;
  74. }
  75. catch(...)
  76. {
  77. pObj = NULL;
  78. }
  79. }
  80. else
  81. {
  82. ATLTRACE(_T("SAFE_DELETE: called on NULL object\n"));
  83. }
  84. }
  85. inline void SAFE_SYSFREESTRING(BSTR* i_pbstr)
  86. {
  87. if (NULL != i_pbstr)
  88. {
  89. try
  90. {
  91. SysFreeString(*i_pbstr);
  92. *i_pbstr = NULL;
  93. }
  94. catch(...)
  95. {
  96. *i_pbstr = NULL;
  97. }
  98. }
  99. else
  100. {
  101. ATLTRACE(_T("SAFE_SYSFREESTRING: called on NULL BSTR\n"));
  102. }
  103. }
  104. #ifndef _DEBUG
  105. // Put unreferenced parameter warning off
  106. #pragma warning(disable : 4100)
  107. #endif // _DEBUG
  108. //{{AFX_INSERT_LOCATION}}
  109. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  110. #endif // !defined(AFX_STDAFX_H__D8861A25_3343_11D1_BE3D_00A024DFD45D__INCLUDED)