I have a utility that I need to run on a Windows 2000 machine. It includes <comadmin.h> In Visual Studio 2019 it compiles fine and I didn't need to specify any additional .lib files. I removed all C++11 & later code and the compilation completes but fails at linking. In VC++6 on Windows XP with Windows Server 2003 SP1 Platform SDK get the following error:
ComPlus.obj : error LNK2001: unresolved external symbol _IID_ICatalogObject
ComPlus.obj : error LNK2001: unresolved external symbol _IID_ICatalogCollection
ComPlus.obj : error LNK2001: unresolved external symbol _CLSID_COMAdminCatalog
Debug/ComPlus.exe : fatal error LNK1120: 3 unresolved externals
I've tried including comsupp.lib and comsvcs.lib but this didn't help. Example code:
CComQIPtr <ICOMAdminCatalog> pCatalog;
HRESULT hr = pCatalog.CoCreateInstance(CLSID_COMAdminCatalog);
The platform SDK documentation specifies:
Platforms: Windows 2000, Windows XP, Windows Server 2003
Header: Declared in comadmin.h
Library: Included as a resource in comadmin.dll
Tried to specify comadmin.dll as a library but advised it was wrong format. The DLL has a TYPELIB resource like this:
What config is required to use this or does it have to be coded differently against this older SDK?