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.

158 lines
3.6 KiB

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