windows-nt/Source/XPSP1/NT/ds/adsi/oledsvw/cdomain.cpp
2020-09-26 16:20:57 +08:00

165 lines
3.5 KiB
C++

#include "stdafx.h"
#include "resource.h"
#include "objects.h"
#include "maindoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
COleDsDomain::COleDsDomain( )
{
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
COleDsDomain::COleDsDomain( IUnknown *pIUnk): COleDsObject( pIUnk )
{
m_bHasChildren = TRUE;
m_bSupportAdd = TRUE;
m_bSupportMove = TRUE;
m_bSupportCopy = TRUE;
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
COleDsDomain::~COleDsDomain( )
{
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
DWORD COleDsDomain::GetChildren( DWORD* pTokens,
DWORD dwMaxChildren,
CDialog* pQueryStatus,
BOOL* pFilters,
DWORD dwFilters )
{
HRESULT hResult;
IADsContainer* pIContainer;
if( NULL == m_pIUnk )
{
ASSERT( FALSE );
return 0L;
}
hResult = m_pIUnk->QueryInterface( IID_IADsContainer,
(void**) &pIContainer );
ASSERT( SUCCEEDED( hResult ) );
if( FAILED( hResult ) )
{
return 0L;
}
COleDsObject::GetChildren( pTokens, dwMaxChildren, pQueryStatus,
pFilters, dwFilters );
COleDsObject::GetChildren( pIContainer );
pIContainer->Release( );
return m_dwCount;
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
HRESULT COleDsDomain::DeleteItem( COleDsObject* pObject )
{
return ContainerDeleteItem( pObject );
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
HRESULT COleDsDomain::AddItem( )
{
return ContainerAddItem( );
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
HRESULT COleDsDomain::MoveItem( )
{
return ContainerMoveItem( );
}
/***********************************************************
Function:
Arguments:
Return:
Purpose:
Author(s):
Revision:
Date:
***********************************************************/
HRESULT COleDsDomain::CopyItem( )
{
return ContainerCopyItem( );
}