LibraryImport examples, especially on Linux
Has anyone got examples of usage of the newer LibraryImport infrastructure (?) as opposed to DllImport?
I have seen https://stackoverflow.com/questions/75304403/marshalling-function-pointers-with-net-7-libraryimport which just about melted my face off
and https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation isn't bad but no one seems to be using this in open source code.
I have seen https://stackoverflow.com/questions/75304403/marshalling-function-pointers-with-net-7-libraryimport which just about melted my face off
and https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation isn't bad but no one seems to be using this in open source code.
Stack Overflow
I'm trying to implement some P/Invoke code using the new LibraryImport attribute, as opposed to the old DllImport. Specifically, I am trying to marshal a WNDCLASSEXW struct for use in RegisterClass...
Learn about compile-time source generation for platform invokes in .NET.
