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.

167 lines
3.8 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. COleDsNamespace::COleDsNamespace( )
  20. {
  21. m_bHasChildren = TRUE;
  22. m_bSupportAdd = TRUE;
  23. m_bSupportMove = TRUE;
  24. m_bSupportCopy = TRUE;
  25. }
  26. /***********************************************************
  27. Function:
  28. Arguments:
  29. Return:
  30. Purpose:
  31. Author(s):
  32. Revision:
  33. Date:
  34. ***********************************************************/
  35. COleDsNamespace::COleDsNamespace( IUnknown *pIUnk): COleDsObject( pIUnk )
  36. {
  37. m_bHasChildren = TRUE;
  38. m_bSupportAdd = TRUE;
  39. m_bSupportMove = TRUE;
  40. m_bSupportCopy = TRUE;
  41. }
  42. /***********************************************************
  43. Function:
  44. Arguments:
  45. Return:
  46. Purpose:
  47. Author(s):
  48. Revision:
  49. Date:
  50. ***********************************************************/
  51. COleDsNamespace::~COleDsNamespace( )
  52. {
  53. }
  54. /***********************************************************
  55. Function:
  56. Arguments:
  57. Return:
  58. Purpose:
  59. Author(s):
  60. Revision:
  61. Date:
  62. ***********************************************************/
  63. DWORD COleDsNamespace::GetChildren( DWORD* pTokens,
  64. DWORD dwMaxChildren,
  65. CDialog* pQueryStatus,
  66. BOOL* pFilters,
  67. DWORD dwFilters )
  68. {
  69. HRESULT hResult;
  70. IADsContainer* pIContainer;
  71. if( NULL == m_pIUnk )
  72. {
  73. ASSERT( FALSE );
  74. return 0L;
  75. }
  76. hResult = m_pIUnk->QueryInterface( IID_IADsContainer,
  77. (void**) &pIContainer );
  78. ASSERT( SUCCEEDED( hResult ) );
  79. if( FAILED( hResult ) )
  80. {
  81. return 0L;
  82. }
  83. COleDsObject::GetChildren( pTokens, dwMaxChildren, pQueryStatus,
  84. pFilters, dwFilters );
  85. COleDsObject::GetChildren( pIContainer );
  86. pIContainer->Release( );
  87. return m_dwCount;
  88. }
  89. /***********************************************************
  90. Function:
  91. Arguments:
  92. Return:
  93. Purpose:
  94. Author(s):
  95. Revision:
  96. Date:
  97. ***********************************************************/
  98. HRESULT COleDsNamespace::DeleteItem( COleDsObject* pObject )
  99. {
  100. return ContainerDeleteItem( pObject );
  101. }
  102. /***********************************************************
  103. Function:
  104. Arguments:
  105. Return:
  106. Purpose:
  107. Author(s):
  108. Revision:
  109. Date:
  110. ***********************************************************/
  111. HRESULT COleDsNamespace::AddItem( )
  112. {
  113. return ContainerAddItem( );
  114. }
  115. /***********************************************************
  116. Function:
  117. Arguments:
  118. Return:
  119. Purpose:
  120. Author(s):
  121. Revision:
  122. Date:
  123. ***********************************************************/
  124. HRESULT COleDsNamespace::MoveItem( )
  125. {
  126. return ContainerMoveItem( );
  127. }
  128. /***********************************************************
  129. Function:
  130. Arguments:
  131. Return:
  132. Purpose:
  133. Author(s):
  134. Revision:
  135. Date:
  136. ***********************************************************/
  137. HRESULT COleDsNamespace::CopyItem( )
  138. {
  139. return ContainerCopyItem( );
  140. }