Yes your use of CoCreateInstance_() does not look right at all.
Also, your use of CLSIDFromString_() seems invalid and will undoubtedly lead to memory access errors. You want to pass this function the address of a CLSID structure, not the address of a pointer to such a structure.
The difference is that a CLSID structure occupies 16 bytes whilst a *CLSID occupies 4 bytes.. hence the invalid memory access.
Use something like :
Code: Select all
Define.CLSID CLSID_Interface
lnRtn = CLSIDFromString_("{4C791FAF-8649-462D-A93A-185F95C2DC0E}",@CLSID_Interface)