Getting the Printer Friendly name from the Device Center shell folder

If you are writing a context menu for the device center, you will probably need to get the “canonical” or “friendly” name of the printer or device that the user has right-clicked on. While your context menu extension gets passed a data object that should contain this information, it unfortunately doesn’t. However, here’s some code…


Servicing Dependencies, Part 2

Now what happens if the dependency is not with respect to a regular API, but with a COM interface ? Suppose a COM interface IControl is implemented by CControl, in a dll DLL1. Now DLL2 obtains this CControl indirectly (for example, calling IControl* m_control = CoCreateInstance(…) with clsid==CLSID_CControl and riid==IID_IControl), therefore using it as an…