CoCreateInstanceEx is CLSID (which is a GUID) of the object to be created. The passed GUID is looked up in the registry under Registry: HKEY_CLASSES_ROOT\CLSID[`HKEY_CLASSES_ROOT\CLSID. LoadLibrary() and then calls DllGetClassObject which returns an instance of the class factory. CreateInstance() is called which returns a pointer to a vtbl to of the required interface.