Skip to content

Consider replacing all Marshal.PtrToStructure with manual marshalling  #409

Description

@Fabi

Recently I worked on some apps with sharppcap and tested it with the reflection free mode in native aot. Currently it's incompatible due to the usage of Marshal.PtrToStructure.
It should be considered to change all those usages to custom marshalling to have those things working at least in .NET 7 in reflection free mode.

Samples from a runtime change: https://github.com/dotnet/runtime/pull/70866/files

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions