Function wintun::load_from_path
source · pub unsafe fn load_from_path<P>(path: P) -> Result<Wintun, Error>
Expand description
Attempts to load the Wintun library as a dynamic library from the given path.
Safety
This function loads a dll file with the path provided. This is inherently unsafe as a user could simply rename undefined_behavior.dll to wintun.dll and do nefarious things inside of its DllMain function. In most cases, a regular wintun.dll file which exports all of the required functions for these bindings to work is loaded. Because WinTun is a well-written and well-tested library, loading a normal wintun.dll file should be safe. Hoverer one can never be too cautious when loading a dll file.
For more information see libloading
’s dynamic library safety guarantees: libloading