Skip to content

[DllImportGenerator] "MarshalUsing" ignores "ref" return type #1650

@SupinePandora43

Description

@SupinePandora43
[GeneratedDllImport("MyDLL")]
[return: MarshalUsing(typeof(MyStringMarshaler))]
public static partial string MyFunction();

and

[GeneratedDllImport("MyDLL")]
[return: MarshalUsing(typeof(MyStringMarshaler))]
public static partial ref string MyFunction();

will return same pinvoke, ex.

[System.Runtime.InteropServices.DllImportAttribute("MyDLL", EntryPoint = "MyFunction")]
extern private static unsafe global:Type_Of_MyStringMarshaler_Value MyFunction__PInvoke__();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions