Sorry if that question did not make a lot of sense. I am trying to make a Hello World Shell Extension Handler. I have been following this tutorial.
It says Shell Extension Handlers must implement IUnknown interface and a class factory which I have done.
class TestInterfaceImplementation : public IUnknown, public IClassFactory
ULONG STDMETHODCALLTYPE AddRef()
RESULT STDMETHODCALLTYPE QueryInterface(IN REFIID riid, OUT void **ppvObject)
ULONG STDMETHODCALLTYPE Release()
HRESULT STDMETHODCALLTYPE CreateInstance(IN IUnknown *pUnkOuter, IN REFIID riid, OUT void **ppvObject)
HRESULT STDMETHODCALLTYPE LockServer(IN BOOL fLock)
But that's all it says. When I go to implement DllGetClassObject it says I am providing the wrong argument to the constructor of my Shell Extension.
HRESULT __stdcall DllGetClassObject(IN REFCLSID rclsid, IN REFIID riid, OUT LPVOID *ppv) {
TestInterfaceImplementation *tii = new TestInterfaceImplementation(rclsid);
}
The exact error is:
error C2664: 'TestInterfaceImplementation::TestInterfaceImplementation(const TestInterfaceImplementation &)' : cannot convert parameter 1 from 'const IID' to 'const TestInterfaceImplementation &'
But nowhere in the tutorial (first link I posted) does it say you have to (or how to) override the constructor so I am lost.
Here is my complete code up until this point.