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

1 view (last 30 days)
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.

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!