You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the dotnet target, we should allow and handle the use of the DllImportAttribute to describe native interop functions.
This should be straight-forward as Oly has a way to describe an attribute as an import attribute which means we do not have provide an implementation for that function.
Thus, when importing DllImportAttribute in the MSIL => OlyIL conversion, we should add a heuristic for DllImportAttribute to be marked as an import attribute. Then, in the emitter we appropriately handle the DllImportAttribute to turn it into a pinvoke method. We already have some code that can do this, we just need to enable it and handle it further.
Note: Consider adding analysis to make sure DllImportAttribute is not mis-used.
Activity