Partager via


ComUtilities Class

Provides miscellaneous methods that can be used when interacting with unmanaged code (COM objects) or interop types.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Shell.ComUtilities

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public NotInheritable Class ComUtilities
public static class ComUtilities
public ref class ComUtilities abstract sealed
[<AbstractClass>]
[<Sealed>]
type ComUtilities =  class end
public final class ComUtilities

The ComUtilities type exposes the following members.

Methods

  Name Description
Public methodStatic member EnumerableFrom(IEnumHierarchies) Gets a .NET-style enumerator (IEnumerable<IVsHierarchy>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member EnumerableFrom(IEnumWindowFrames) Gets a .NET-style enumerator (IEnumerable<IVsWindowFrame>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member EnumerableFrom(IVsEnumGuids) Gets a .NET-style enumerator (IEnumerable<Guid>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member EnumerableFrom(IVsEnumSearchProviders) Gets a .NET-style enumerator (IEnumerable<IVsSearchProvider>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member EnumerableFrom(IVsEnumTaskItems) Gets a .NET-style enumerator (IEnumerable<IVsTaskItem>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member EnumerableFrom(IVsUIEnumDataSourceProperties) Gets a .NET-style enumerator (IEnumerable<VsUIPropertyDescriptor>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member EnumerableFrom(IVsUIEnumDataSourceVerbs) Gets a .NET-style enumerator (IEnumerable<string>) from the specified Visual Studio COM enumeration interface.
Public methodStatic member IsSameComObject Verifies that the specified objects represent the same instance of an object. This method essentially compares the IUnknown pointers of the two objects, which is needed in scenarios where aggregation is involved.
Public methodStatic member QueryInterfaceIUnknown Retrieves the IUnknown for the specified managed or COM object.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace