How to convert an Interface.IUnknown handle to a known registrited COM object

I'm currently working on COM objects in Matlab, I can well create a COM object with
retObj = actxserver('xxx')
When I called a function of 'xxx':
retInt = GetAnInterface(retObj)
It gives a result of type
Interface.IUnknown
Because Matlab does not know the exact type of `retInt`, I cannot use any method of retInt.
According to the tutorial of 'xxx', in other languages, it is necessary to declare a variable of type 'yyy' and then the com interface will be casted automatically.
My question is how to cast the retInt (Interface.IUnknown) to another COM object type? Thanks in advance.

Risposte (0)

Prodotti

Release

R2019b

Richiesto:

il 4 Mag 2021

Modificato:

il 4 Mag 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by