FlavoredProjectBase::GetComInterface<Interface_T> Method ()

 

A project derived from this base class will be aggregated with a native COM component (the ProjectAggregator object) that can also aggregate an inner project in case of flavoring.

Namespace:   Microsoft.VisualStudio.Shell.Flavor
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
generic<typename Interface_T>
where Interface_T : ref class
Interface_T GetComInterface()

Return Value

Type: Interface_T

Returns Int32.

Type Parameters

Interface_T

All the requests for interfaces exposed to COM must be handled by the external object that has a special implementation of QueryInterface that handles both inner and outer projects.

If you don’t use this helper method when requesting an interface you can get unexpected InvalidCast exceptions.

If you want to get the implementation of an interface implemented by your FlavoredProjectBase-derived object, then you must use the standard cast operator.

Return to top
Show: