1 //*******************************************************************************
4 // You may use this source code, compile or redistribute it as part of your application
5 // for free. You cannot redistribute it as a part of a software development
6 // library without the agreement of the author. If the sources are
7 // distributed along with the application, you should leave the original
8 // copyright notes in the source code without any changes.
9 // This code can be used WITHOUT ANY WARRANTIES at your own risk.
11 // For the latest updates to this code, check this site:
12 // http://www.masmex.com
15 // Copyright(C) 2000 Philip Oldaker <email: philip@masmex.com>
16 //*******************************************************************************
19 #include "ShellDetails.h"
21 HRESULT CShellDetails::GetDetailsOf(LPCITEMIDLIST pidl,UINT iColumn,LPSHELLDETAILS pDetail)
26 IShellFolder2 *pShellFolder2=NULL;
27 hr = m_pUnk->QueryInterface(IID_IShellFolder2,(LPVOID*)&pShellFolder2);
30 hr = pShellFolder2->GetDetailsOf(pidl,iColumn,pDetail);
31 pShellFolder2->Release();
35 IShellDetails *pShellDetails=NULL;
36 hr = m_pUnk->QueryInterface(IID_IShellDetails,(LPVOID*)&pShellDetails);
39 hr = pShellDetails->GetDetailsOf(pidl,iColumn,pDetail);
40 pShellDetails->Release();
46 bool CShellDetails::IsValidDetails()
48 return m_pUnk != NULL;
51 void CShellDetails::SetShellDetails(IUnknown *pUnk)
61 CShellDetails::CShellDetails(const CShellDetails &rOther)
62 : m_pUnk(rOther.m_pUnk)
67 const CShellDetails &CShellDetails::operator=(const CShellDetails &rOther)
73 m_pUnk = rOther.m_pUnk;
79 void CShellDetails::FreeInterfaces()
88 CShellDetails::CShellDetails()
93 CShellDetails::~CShellDetails()