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.

164 lines
3.6 KiB

  1. #include "stdafx.h"
  2. #include "resource.h"
  3. #include "objects.h"
  4. #include "maindoc.h"
  5. #ifdef _DEBUG
  6. #define new DEBUG_NEW
  7. #undef THIS_FILE
  8. static char THIS_FILE[] = __FILE__;
  9. #endif
  10. /***********************************************************
  11. Function:
  12. Arguments:
  13. Return:
  14. Purpose:
  15. Author(s):
  16. Revision:
  17. Date:
  18. ***********************************************************/
  19. COleDsDomain::COleDsDomain( )
  20. {
  21. }
  22. /***********************************************************
  23. Function:
  24. Arguments:
  25. Return:
  26. Purpose:
  27. Author(s):
  28. Revision:
  29. Date:
  30. ***********************************************************/
  31. COleDsDomain::COleDsDomain( IUnknown *pIUnk): COleDsObject( pIUnk )
  32. {
  33. m_bHasChildren = TRUE;
  34. m_bSupportAdd = TRUE;
  35. m_bSupportMove = TRUE;
  36. m_bSupportCopy = TRUE;
  37. }
  38. /***********************************************************
  39. Function:
  40. Arguments:
  41. Return:
  42. Purpose:
  43. Author(s):
  44. Revision:
  45. Date:
  46. ***********************************************************/
  47. COleDsDomain::~COleDsDomain( )
  48. {
  49. }
  50. /***********************************************************
  51. Function:
  52. Arguments:
  53. Return:
  54. Purpose:
  55. Author(s):
  56. Revision:
  57. Date:
  58. ***********************************************************/
  59. DWORD COleDsDomain::GetChildren( DWORD* pTokens,
  60. DWORD dwMaxChildren,
  61. CDialog* pQueryStatus,
  62. BOOL* pFilters,
  63. DWORD dwFilters )
  64. {
  65. HRESULT hResult;
  66. IADsContainer* pIContainer;
  67. if( NULL == m_pIUnk )
  68. {
  69. ASSERT( FALSE );
  70. return 0L;
  71. }
  72. hResult = m_pIUnk->QueryInterface( IID_IADsContainer,
  73. (void**) &pIContainer );
  74. ASSERT( SUCCEEDED( hResult ) );
  75. if( FAILED( hResult ) )
  76. {
  77. return 0L;
  78. }
  79. COleDsObject::GetChildren( pTokens, dwMaxChildren, pQueryStatus,
  80. pFilters, dwFilters );
  81. COleDsObject::GetChildren( pIContainer );
  82. pIContainer->Release( );
  83. return m_dwCount;
  84. }
  85. /***********************************************************
  86. Function:
  87. Arguments:
  88. Return:
  89. Purpose:
  90. Author(s):
  91. Revision:
  92. Date:
  93. ***********************************************************/
  94. HRESULT COleDsDomain::DeleteItem( COleDsObject* pObject )
  95. {
  96. return ContainerDeleteItem( pObject );
  97. }
  98. /***********************************************************
  99. Function:
  100. Arguments:
  101. Return:
  102. Purpose:
  103. Author(s):
  104. Revision:
  105. Date:
  106. ***********************************************************/
  107. HRESULT COleDsDomain::AddItem( )
  108. {
  109. return ContainerAddItem( );
  110. }
  111. /***********************************************************
  112. Function:
  113. Arguments:
  114. Return:
  115. Purpose:
  116. Author(s):
  117. Revision:
  118. Date:
  119. ***********************************************************/
  120. HRESULT COleDsDomain::MoveItem( )
  121. {
  122. return ContainerMoveItem( );
  123. }
  124. /***********************************************************
  125. Function:
  126. Arguments:
  127. Return:
  128. Purpose:
  129. Author(s):
  130. Revision:
  131. Date:
  132. ***********************************************************/
  133. HRESULT COleDsDomain::CopyItem( )
  134. {
  135. return ContainerCopyItem( );
  136. }