See the question and my original answer on StackOverflow

This is why Microsoft has taken the COM approach more than 30 years ago and sticks with it (WinRT is COM) almost everywhere in Windows. At its root, COM is "just" a binary (not source code, this is fundamental) reusable contract, the vtable, plus the IUnknown interface. Then, on top of this you have many optional other services (factory, registration, automation, threading, etc.). Just using vtable + IUnknown is often called "Nano COM" today. Typically the DirectX devs (Direct3D, Direct2D, DirectWrite, DirectComposition, etc.) have chosen this path, they provide an initial factory (no CoCreateInstance/registry needed) and you can program the whole API using binary interfaces. If you can get a copy of "Essential COM" by Don Box, that may be of interest (especially the first pages that explain history, links with C++, etc.).