Platforms to show: All Mac Windows Linux Cross-Platform
SetDllDirectoryMBS(path as folderitem) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| global method | Files | MBS Util Plugin | 25.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
The directory to be added to the search path. If this parameter is an empty string (""), the call removes the current directory from the default DLL search order. If this parameter is nil, the function restores the default search order.
If the function succeeds, the return value is true, otherwise false.
The SetDllDirectory function affects all subsequent calls to the LoadLibrary and LoadLibraryEx functions. It also effectively disables safe DLL search mode while the specified directory is in the search path.
After calling SetDllDirectory, the standard DLL search path is
- The directory from which the application loaded.
- The directory specified by the SetDllDirectory function.
- The system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is System32.
- The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
- The directories that are listed in the PATH environment variable.
To revert to the standard search path used by LoadLibrary and LoadLibraryEx, call SetDllDirectory with nil. This also restores safe DLL search mode based on the SafeDllSearchMode registry value.
Blog Entries
The items on this page are in the following plugins: MBS Util Plugin.