Is there a need to re-specify the Com interface type attribute if it is inherited from another Com interface in which the type has already been specified?
Example:
[ComImport] [Guid("aec22fb8-76f3-4639-9be0-28eb43a67a2e")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IDXGIObject { long SetPrivateData([In] ref Guid name, [In] uint dataSize, IntPtr dataPtr); long SetPrivateDataInterface([In] ref Guid name, [In] [MarshalAs(UnmanagedType.IUnknown)] object unknownInterfaceObject); long GetPrivateData([In] ref Guid name, out int dataSize, out IntPtr dataPtr); long GetParent([In] ref Guid rIId, [Out] out object pParent); } Further, his successor will be IDXGIFactory :
/// <inheritdoc cref="IDXGIObject"/> /> /// <summary> /// An IDXGIFactory interface implements methods for generating DXGI objects (which handle fullscreen transitions). /// </summary> [ComImport] [Guid("7b7166ec-21c7-44ae-b21a-c9ae321ae369")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IDXGIFactory : IDXGIObject { /// <summary> /// Enumerates the adapters (video cards). /// </summary> [PreserveSig] HResult EnumAdapters(uint numAdapter, [MarshalAs(UnmanagedType.IUnknown)] out object adapter); /// <summary> /// Allows DXGI to monitor an application's message queue for the alt-enter key sequence (which causes the application /// to switch from windowed to fullscreen or vice versa). /// </summary> [PreserveSig] HResult MakeWindowAssociation(IntPtr windowHandle, uint flags); /// <summary> /// Get the window through which the user controls the transition to and from fullscreen. /// </summary> [PreserveSig] HResult GetWindowAssociation(out IntPtr outHandleWindow); /// <summary> /// Creates a swap chain. /// </summary> [PreserveSig] HResult CreateSwapChain(IntPtr lpIUnknown, IntPtr ptr, out IntPtr outPtr); /// <summary> /// Create an adapter interface that represents a software adapter. /// </summary> [PreserveSig] HResult CreateSoftwareAdapter(IntPtr moduleHandle, out IntPtr outPtr); } Do you need to re-write the attribute
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] for the heir interface, if it is also essentially IUnknown ?