AdvancedDLSupport 1.2.2
See the version list below for details.
dotnet add package AdvancedDLSupport --version 1.2.2
NuGet\Install-Package AdvancedDLSupport -Version 1.2.2
<PackageReference Include="AdvancedDLSupport" Version="1.2.2" />
paket add AdvancedDLSupport --version 1.2.2
#r "nuget: AdvancedDLSupport, 1.2.2"
// Install AdvancedDLSupport as a Cake Addin #addin nuget:?package=AdvancedDLSupport&version=1.2.2 // Install AdvancedDLSupport as a Cake Tool #tool nuget:?package=AdvancedDLSupport&version=1.2.2
AdvanceDLSupport
Alternative approach to your usual P/Invoke!
Use C# interfaces to bind to native code - quick and easy usage of C API in C# code, on any platform.
Gone are the days of broken DllImport
and annoying workarounds for the different runtimes.
Fully compatible with Mono, .NET Framework, .NET Core, and .NET Standard. Compatible with Mono DLL mapping on all platforms and runtimes. Configurable and adaptible.
Why use ADL?
- Modern API - no more static classes, no more
extern
. Use your native API as if it were first-class objects. - Flexibility - Inject your native API into your classes, change the library scanning logic, mix your managed and native code.
- Speed - ADL is blazing fast, and gives your native interop an edge. See performance increases that are at least 2 and up to 8 times faster than other, existing solutions.
- Easy to use - Not only is ADL simple to set up and get working, it's a breeze to maintain, and reduces clutter in your codebase.
Build & Test status
Read the Docs, or get the MyGet development packages and get started.
Features
- Supports all the typical P/Invoke patterns and constructs
- Seamlessly mix native functions and managed code
- Use more complex types, such as
Nullable<T>
andstring
without any extra code - Select library architectures at runtime
- Select library names at runtime
- Swappable native library search algorithms
- Import global variables
- Optional lazy loaded symbols
- Optional Mono DllMap support
Basic Usage
Declare your interface
public interface IMyNativeLibrary { long MyNativeGlobal { get; set; } int MyNativeMultiply(int a, int b); void MyOtherNativeFunction(MyStruct strct, ref MyStruct? maybeStruct); }
Activate it
const string MyLibraryName = "MyLibrary"; var activator = new NativeLibraryBuilder(); var library = activator.ActivateInterface<IMyNativeLibrary>(MyLibraryName);
Use it
library.MyNativeGlobal = 10; var result = library.MyNativeMultiply(5, 5); var myStruct = new MyStruct(); MyStruct? myOtherStruct = null; library.MyOtherNativeFunction(myStruct, ref myOtherStruct);
See the Quickstart for more information.
Installation
Via your favourite Nuget UI, or
NuGet
Install-Package AdvancedDLSupport -ProjectName MyProject
MyGet
nuget sources Add -Name AdvancedDLSupport-develop -Source https://www.myget.org/F/advancedlsupport/api/v3/index.json
Install-Package AdvancedDLSupport -ProjectName MyProject
License
If the library's license doesn't fit your project or product, please contact us. Custom licensing options are available, and we are always open to working something out that fits you - be it modified, commercial, or otherwise.
AdvancedDLSupport's public release is licensed under the GNU Lesser General Public License, Version 3 (LGPLv3). See the LICENSE for details. Without the support of the open-source movement, it would never have existed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Mono.DllMap (>= 1.0.1)
- StrictEmit (>= 2.2.0)
- System.Reflection.Emit (>= 4.3.0)
- System.Reflection.Emit.ILGeneration (>= 4.3.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.4.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on AdvancedDLSupport:
Package | Downloads |
---|---|
Aximo.Engine
Do not use reference this package directly. Use this meta package: https://www.nuget.org/packages/Aximo Aximo Game Engine is an Open Source Game Engine written purly in C#. Documentation: https://www.aximo.games Source: https://github.com/AximoGames/AxEngine |
|
Iterum.PhysX
PhysX server simulation |
|
ArtsTech.AspnetCore.Authentication.Ntlm
Package Description |
|
Hast.Vitis
This project contains the communication service used to connect with Xilinx's Vitis Unified Software Platform devices, such as the Xilinx Alveo U250 FPGA accelerator card via the OpenCL library. See the project website for detailed documentation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.2.0 | 60,182 | 3/8/2020 |
3.1.0 | 17,645 | 9/27/2019 |
3.0.0 | 3,582 | 6/9/2019 |
2.3.2 | 2,595 | 1/2/2019 |
2.3.1 | 852 | 12/21/2018 |
2.3.0 | 4,605 | 9/17/2018 |
2.2.0 | 1,054 | 8/26/2018 |
2.1.2 | 7,499 | 8/9/2018 |
2.1.0 | 3,244 | 7/26/2018 |
2.0.0 | 1,057 | 7/22/2018 |
1.3.0 | 50,825 | 4/20/2018 |
1.2.2 | 1,113 | 4/17/2018 |
1.2.1 | 1,304 | 4/13/2018 |
1.2.0 | 1,279 | 4/13/2018 |
1.1.0 | 1,094 | 3/20/2018 |
1.0.0 | 1,251 | 3/19/2018 |
Relicense under LGPLv3.