How to cast on the return value from GetAddinObject

I am using GetAddinObject method to get the addin loaded in SoliWorks. It returns me an object in the type of System.__ComObject .

How can I cast it to real addin object ?  When try to use direct cast, but it raises an exception.  The addin is implemented in c#.

Thanks.

SolidworksApi macros