advancedlsupport - AdvancedDLSupport 1.0.0-CI00084

An alternative approach to your typical P/Invoke.

PM> Install-Package AdvancedDLSupport -Version 1.0.0-CI00084 -Source https://www.myget.org/F/advancedlsupport/api/v3/index.json

Copy to clipboard

> nuget.exe install AdvancedDLSupport -Version 1.0.0-CI00084 -Source https://www.myget.org/F/advancedlsupport/api/v3/index.json

Copy to clipboard

> dotnet add package AdvancedDLSupport --version 1.0.0-CI00084 --source https://www.myget.org/F/advancedlsupport/api/v3/index.json

Copy to clipboard
<PackageReference Include="AdvancedDLSupport" Version="1.0.0-CI00084" />
Copy to clipboard
source https://www.myget.org/F/advancedlsupport/api/v3/index.json

nuget AdvancedDLSupport  ~> 1.0.0-CI00084
Copy to clipboard

> choco install AdvancedDLSupport --version 1.0.0-CI00084 --source https://www.myget.org/F/advancedlsupport/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "advancedlsupport" -SourceLocation "https://www.myget.org/F/advancedlsupport/api/v2"
Install-Module -Name "AdvancedDLSupport" -RequiredVersion "1.0.0-CI00084" -Repository "advancedlsupport" -AllowPreRelease
Copy to clipboard

Browse the sources in this package using Visual Studio or WinDbg by configuring the following legacy symbol server URL: https://www.myget.org/F/advancedlsupport/symbols/


AdvancedDLSupport

Alternative approach to your usual P/Invoke!

Join the chat at https://discord.gg/fDy5Vhb

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?

  1. Modern API - no more static classes, no more extern. Use your native API as if it were first-class objects.
  2. Flexibility - Inject your native API into your classes, change the library scanning logic, mix your managed and native code.
  3. 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.
  4. 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.

Read the Docs, or install via NuGet 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> and string 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

  1. Declare your interface

     public interface IMyNativeLibrary
     {
     	long MyNativeGlobal { get; set; }
     	int MyNativeMultiply(int a, int b);
     	void MyOtherNativeFunction(MyStruct strct, ref MyStruct? maybeStruct);
     }
    
  2. Activate it

     const string MyLibraryName = "MyLibrary";
    
     var activator = new NativeLibraryBuilder();
     var library = activator.ActivateInterface<IMyNativeLibrary>(MyLibraryName);
    
  3. 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

Get it on NuGet!

Support me

Become a Patron Buy Me a Coffee at ko-fi.com

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.

Bug fixes and mixed-mode class improvements.

  • .NETStandard 2.0
    • Humanizer (>= 2.2.0)
    • Mono.DllMap (>= 1.0.0-CI00084)
    • StrictEmit (>= 2.4.2)
    • System.Reflection.Emit (>= 4.3.0)
    • System.Reflection.Emit.ILGeneration (>= 4.3.0)
    • System.Runtime.CompilerServices.Unsafe (>= 4.4.0)
    • System.ValueTuple (>= 4.4.0)
  • .NETStandard 2.0: 2.0.0.0

                        
Assembly Assembly hash Match
/lib/netstandard2.0/advanceddlsupport.dll b968df0a969d489b994a46db1b3b09cdFFFFFFFF

Owners

Jarl Gullberg

Authors

Firwood Software

Project URL

https://github.com/Firwood-Software/AdvanceDLSupport

License

GPL-3.0

Tags

p/invoke cross-platform mono netcore netstandard native interop

Info

11 total downloads
9 downloads for version 1.0.0-CI00084
Download (59.44 KB)
Download legacy symbols (190.01 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.0.0-CI00084 59.44 KB Mon, 24 Sep 2018 16:48:25 GMT 9
1.0.0-CI00083 59.51 KB Mon, 17 Sep 2018 16:50:52 GMT 0
1.0.0-CI00082 59.5 KB Sun, 16 Sep 2018 13:54:22 GMT 0
1.0.0-CI00081 59.39 KB Fri, 14 Sep 2018 17:39:50 GMT 0
1.0.0-CI00080 59.38 KB Fri, 14 Sep 2018 17:27:54 GMT 0
1.0.0-CI00079 59.39 KB Fri, 14 Sep 2018 15:25:55 GMT 0
1.0.0-CI00078 58.9 KB Wed, 12 Sep 2018 14:44:16 GMT 0
1.0.0-CI00077 58.83 KB Wed, 05 Sep 2018 15:29:59 GMT 0
1.0.0-CI00076 58.83 KB Sun, 26 Aug 2018 16:42:27 GMT 1
1.0.0-CI00075 58.83 KB Sat, 25 Aug 2018 19:46:32 GMT 0
1.0.0-CI00074 58.26 KB Fri, 17 Aug 2018 19:51:56 GMT 0
1.0.0-CI00073 58.26 KB Fri, 17 Aug 2018 19:25:14 GMT 0
1.0.0-CI00071 67.96 KB Thu, 26 Jul 2018 19:06:05 GMT 0
1.0.0-CI00070 64.99 KB Sun, 22 Jul 2018 12:12:07 GMT 0
1.0.0-CI00069 64.99 KB Sat, 28 Apr 2018 08:31:45 GMT 0
1.0.0-CI00068 63.66 KB Thu, 26 Apr 2018 08:38:49 GMT 1
1.0.0-CI00067 67.24 KB Wed, 25 Apr 2018 12:12:32 GMT 0
1.0.0-CI00066 65.79 KB Mon, 23 Apr 2018 14:18:33 GMT 0
1.0.0-CI00065 65.93 KB Mon, 23 Apr 2018 13:18:15 GMT 0
1.0.0-CI00064 65.79 KB Mon, 23 Apr 2018 12:40:23 GMT 0
1.0.0-CI00063 59.61 KB Fri, 20 Apr 2018 15:51:11 GMT 0
1.0.0-CI00062 57.04 KB Wed, 18 Apr 2018 17:46:10 GMT 0
1.0.0-CI00061 57.04 KB Wed, 18 Apr 2018 10:42:55 GMT 0
1.0.0-CI00060 53.93 KB Tue, 17 Apr 2018 15:07:55 GMT 0
1.0.0-CI00059 53.93 KB Tue, 17 Apr 2018 13:22:23 GMT 0
1.0.0-CI00058 53.56 KB Sat, 14 Apr 2018 20:19:55 GMT 0
1.0.0-CI00057 53.57 KB Fri, 13 Apr 2018 17:50:45 GMT 0
1.0.0-CI00056 53.22 KB Fri, 13 Apr 2018 10:09:18 GMT 0
1.0.0-CI00055 48.18 KB Fri, 23 Mar 2018 15:55:44 GMT 0
1.0.0-CI00054 48.16 KB Tue, 20 Mar 2018 20:04:58 GMT 0
1.0.0-CI00053 48.01 KB Tue, 20 Mar 2018 17:33:39 GMT 0
1.0.0-CI00052 48 KB Tue, 20 Mar 2018 13:42:08 GMT 0
1.0.0-CI00051 48.01 KB Tue, 20 Mar 2018 12:59:54 GMT 0
1.0.0-CI00050 48 KB Mon, 19 Mar 2018 16:25:28 GMT 0