Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

enum System.Runtime.InteropServices.DllImportSearchPath

Assembly: System.Runtime.InteropServices

Specifies the paths that are used to search for DLLs that provide functions for platform invokes.

Values

LegacyBehavior
Search the application directory, and then call the Win32 LoadLibraryEx function with the <c>LOAD_WITH_ALTERED_SEARCH_PATH</c> flag. This value is ignored if any other value is specified. Operating systems that do not support the <see cref="T:System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute" /> attribute use this value, and ignore other values.
AssemblyDirectory
When searching for assembly dependencies, include the directory that contains the assembly itself, and search that directory first. When used in Native AOT and single-file deployment models, the application's installation directory is considered the "assembly directory" and is searched.
UseDllDirectoryForDependencies
Search for the dependencies of a DLL in the folder where the DLL is located before searching other folders.
ApplicationDirectory
Include the application directory in the DLL search path.
UserDirectories
Include any path that was explicitly added to the process-wide search path by using the Win32 <c>AddDllDirectory</c> function.
System32
Include the <see langword="%WinDir%\System32" /> directory in the DLL search path.
SafeDirectories
Include the application directory, the <see langword="%WinDir%\System32" /> directory, and user directories in the DLL search path.