'attribute' : System.Interop.UnmanagedType.CustomMarshaller requires named arguments ComType and Marshal
The ComType and Marshal arguments must be specified when the marshal format is System.Interop.UnmanagedType.CustomMarshaller.
The following sample generates CS0635:
class MyCustomMarshallerClass { } public class MyClass { [dllimport("MyDll.dll")] public static extern void MyFunc( [marshal(System.Interop.UnmanagedType.CustomMarshaler] // CS0635 // try the following lines instead // [marshal(System.Interop.UnmanagedType.CustomMarshaler, ComType="MyProgId", // Marshaller=typeof(MyCustomMarshallerClass))] object o); public static void Main() { } }