1 // TortoiseOverlays - an overlay handler for Tortoise clients
2 // Copyright (C) 2007 - TortoiseSVN
5 #include "ShellExtClassFactory.h"
8 CShellExtClassFactory::CShellExtClassFactory(FileState state
)
10 m_StateToMake
= state
;
17 CShellExtClassFactory::~CShellExtClassFactory()
22 STDMETHODIMP
CShellExtClassFactory::QueryInterface(REFIID riid
,
27 // Any interface on this object is the object pointer
29 if (IsEqualIID(riid
, IID_IUnknown
) || IsEqualIID(riid
, IID_IClassFactory
))
31 *ppv
= (LPCLASSFACTORY
)this;
41 STDMETHODIMP_(ULONG
) CShellExtClassFactory::AddRef()
46 STDMETHODIMP_(ULONG
) CShellExtClassFactory::Release()
56 STDMETHODIMP
CShellExtClassFactory::CreateInstance(LPUNKNOWN pUnkOuter
,
62 // Shell extensions typically don't support aggregation (inheritance)
65 return CLASS_E_NOAGGREGATION
;
67 // Create the main shell extension object. The shell will then call
68 // QueryInterface with IID_IShellExtInit--this is how shell extensions are
71 CShellExt
* pShellExt
= new CShellExt(m_StateToMake
); //Create the CShellExt object
73 if (NULL
== pShellExt
)
76 return pShellExt
->QueryInterface(riid
, ppvObj
);
80 STDMETHODIMP
CShellExtClassFactory::LockServer(BOOL
/*fLock*/)