ERROR!
I thought everything was working fine, when I implemented the COM method using my COM Collection as described below:
STDMETHODIMP CAPIFactory::insertCollection(IUnknown* coll)
{
// TODO: Add your implementation code here
CComPtr<ICollection> pI;
coll->QueryInterface(__uuidof(CCollection), (void **) &pI);
return S_OK;
}
And when I compile the class it works fine... But then when I build the whole project I get the following errors:
COMCTAPI error LNK2001: unresolved external symbol "public: virtual long __stdcall CCollection::Keys(struct tagVARIANT *)" (?Keys@CCollection@@UAGJPAUtagVARIANT@@@Z)
COMCTAPI error LNK2001: unresolved external symbol "public: virtual long __stdcall CCollection::Get(unsigned short *,unsigned short * *)" (?Get@CCollection@@UAGJPAGPAPAG@Z)
COMCTAPI error LNK2001: unresolved external symbol "public: virtual long __stdcall CCollection::Remove(unsigned short *)" (?Remove@CCollection@@UAGJPAG@Z)
COMCTAPI error LNK2001: unresolved external symbol "public: virtual long __stdcall CCollection::Add(unsigned short *,unsigned short *)" (?Add@CCollection@@UAGJPAG0@Z)
Where the function Keys, Get, Remove and Add are the methods in the COM object Collection.
What am I doing wrong? (I have stated #include "../COMCTCollection/Collection.h" in the cpp file)