Search notes:

CoCreateInstanceEx

The first parameter of 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.
If such a CLSID was found, it tries to locate the path of the required DLL under the InprocServer32 subkey..
If such a DLL was found, it loads the DLL with LoadLibrary() and then calls DllGetClassObject which returns an instance of the class factory.
Then, the class factory's CreateInstance() is called which returns a pointer to a vtbl to of the required interface.

See also

The VBA operator new.

Index