-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-System.Runtime.InteropServicessource-generatorIndicates an issue with a source generator featureIndicates an issue with a source generator feature
Milestone
Description
With a .NET 7 project we can convert existing DllImport
into LibraryImport
, see screenshot below. This is a great feature. Unfortunately it does not convert structs into custom marshaller structs. As @AaronRobinsonMSFT mentioned those would provide the most ideal performance instead of using Marshal.PtrToStructure
but also fixing errors we get after the conversion when a struct is used as parameter. Not everyone knows about custom marshaller structs or that they perform better. And not everyone knows how to rewrite their structs. It would be superior, just as with LibraryImport
, if Visual Studio can do this for us. I was getting told to file out an issue here to requesting it. Background: #45100
am11
Metadata
Metadata
Assignees
Labels
area-System.Runtime.InteropServicessource-generatorIndicates an issue with a source generator featureIndicates an issue with a source generator feature
Type
Projects
Status
No status