mirror of https://github.com/tongzx/nt5src
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.
56 lines
1.2 KiB
56 lines
1.2 KiB
//+---------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
// Copyright (C) Microsoft Corporation, 1997.
|
|
//
|
|
// File: I D E L E G A T E . C P P
|
|
//
|
|
// Contents: IDelegateFolder implementation fopr CUPnPDeviceFolder
|
|
//
|
|
// Notes:
|
|
//
|
|
// Author: jeffspr 22 Sep 1997
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#include "pch.h"
|
|
#pragma hdrstop
|
|
|
|
//+---------------------------------------------------------------------------
|
|
//
|
|
// Member: CUPnPDeviceFolder::SetItemAlloc
|
|
//
|
|
// Purpose: IDelegateFolder::SetItemAlloc implementation for
|
|
// CUPnPDeviceFolder
|
|
//
|
|
// Arguments:
|
|
// pmalloc [in] Our new allocator for creating delegate items
|
|
//
|
|
// Returns:
|
|
//
|
|
// Author: jeffspr 22 Sep 1997
|
|
//
|
|
// Notes:
|
|
//
|
|
STDMETHODIMP
|
|
CUPnPDeviceFolder::SetItemAlloc(
|
|
IMalloc *pMalloc)
|
|
{
|
|
if (m_pDelegateMalloc) m_pDelegateMalloc->Release();
|
|
if (pMalloc)
|
|
{
|
|
m_cbDelegate = FIELD_OFFSET(DELEGATEITEMID, rgb);
|
|
}
|
|
else /* Not delegating, use regular malloc */
|
|
{
|
|
m_cbDelegate = 0;
|
|
pMalloc = m_pMalloc;
|
|
}
|
|
|
|
m_pDelegateMalloc = pMalloc;
|
|
m_pDelegateMalloc->AddRef();
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|