Search code examples
windowsunit-testingcom

Looking for a preinstalled Windows COM server to test my client framework


I'm writing a framework for COM clients in Windows and would like to test it against some preinstalled COM servers. Are there some well known servers I could use to run my unit tests?


Solution

  • You can check that for yourself in the registry at HKEY_CLASSES_ROOT\CLSID. Some of the first ones are part of the core of COM, e.g. {0000031A-0000-0000-C000-000000000046}, the class moniker.

    You can also use OleView.exe, it comes with the Windows SDK and Visual Studio (at least the flavors with C++), and check out under Object Classes > All Objects. Copy this tool into a clean Windows installation and check the stock objects.

    However, avoid the PSFactoryBuffere (PS* in general), as they are proxy-stub marshalers and some are probably free-threaded marshaled themselves.

    What might be interesting are the interfaces accessible from those objects, so you'll want to look for stock type libraries in OleView.exe.