🖥️How to use
How do I use this library?
This library contains a class that manages how to load the libraries according to both the operating system and the architecture specification using different paths, called LibraryManager
. This allows you to load native libraries by copying the native library file or stream to a file in the application executable directory.
You just need to get a byte stream for either your file or a resource found inside your application using one of the available methods, such as Assembly.GetManifestResourceStream()
+ Stream.CopyTo()
for embedded resource streams or File.ReadAllBytes()
for file streams. This is an example of how to create a new instance of the library manager:
Once you're done creating new instances of library manager classes, you can now load all of them when needed, as in LoadNativeLibrary()
. To verify that it's truly loaded, place a P/Invoke of one or more of the library's functions and call it somewhere after initialization.
Last updated