public static NativeTypeDefinition Get(NativeTypeDesc desc) { // delegates are marshaled as _Delegate COM interface // UUID = FB6AB00F-5096-3AF8-A33D-D7885A5FA829 return(NativeTypeDefinition.Get <DelegateInterfaceDefinition>( new TypeDefKey(typeof(Delegate), (desc.Flags & MarshalFlags.TypeDefKeyFlags) | MarshalFlags.ComInterop))); }
public static NativeTypeDefinition Get(NativeTypeDesc desc) { // when a delegate is marshaled as an unmanaged function pointer, its // parameters and return type have P/Invoke's default marshaling behavior // regardless of whether the function pointer is passed to a static entry // point or to a COM member return(NativeTypeDefinition.Get <FunctionPtrDefinition>( new TypeDefKey(desc.Type, (desc.Flags & MarshalFlags.TypeDefKeyFlags) & ~MarshalFlags.ComInterop))); }
public static StructureDefinition Get(NativeTypeDesc desc) { return(NativeTypeDefinition.Get <StructureDefinition>( new TypeDefKey(desc.Type, (desc.Flags & MarshalFlags.TypeDefKeyFlags)))); }
public static EnumDefinition Get(NativeTypeDesc desc, UnmanagedType underlyingType) { return(NativeTypeDefinition.Get <EnumDefinition>( new TypeDefKeyWithUnmanagedType(desc.Type, (desc.Flags & MarshalFlags.TypeDefKeyFlags), underlyingType))); }