summaryrefslogtreecommitdiffstats
path: root/DynamicLoader.hxx.in
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2019-03-28 15:02:39 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-28 15:06:33 (GMT)
commit816663495874e123c2d4a187edb6eab07593f10d (patch)
treef5c66bdc6feb14075ebcf3911896b1a044fa2598 /DynamicLoader.hxx.in
parent868dc1a121f9876a19852e0c6467483ad0d67951 (diff)
downloadCMake-816663495874e123c2d4a187edb6eab07593f10d.zip
CMake-816663495874e123c2d4a187edb6eab07593f10d.tar.gz
CMake-816663495874e123c2d4a187edb6eab07593f10d.tar.bz2
KWSys 2019-03-28 (e92bdbe8)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit e92bdbe8e6eca2a8b6dcf14920e5e25308504206 (master). Upstream Shortlog ----------------- Ben Boeckel (7): 30198dbc DynamicLoader: fix error reporting on Windows cf6b5f69 DynamicLoader: use Encoding::ToWindowsExtendedPath for the libname d17291ad DynamicLoader: support loading libraries using flags 40d9e482 DynamicLoader: support loading sibling libraries on Windows 971809c5 DynamicLoader: test the SearchBesideLibrary flag efb006b9 DynamicLoader: include stdio.h for _snprintf 9e8e9ba0 DynamicLoader: avoid the min/max macros from windows.h Brad King (1): 92334e76 SystemTools: CopyFileAlways: avoid copying file over self
Diffstat (limited to 'DynamicLoader.hxx.in')
-rw-r--r--DynamicLoader.hxx.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/DynamicLoader.hxx.in b/DynamicLoader.hxx.in
index 08f2790..539c742 100644
--- a/DynamicLoader.hxx.in
+++ b/DynamicLoader.hxx.in
@@ -66,10 +66,23 @@ public:
// Return type from DynamicLoader::GetSymbolAddress.
typedef void (*SymbolPointer)();
+ enum OpenFlags
+ {
+ // Search for dependent libraries beside the library being loaded.
+ //
+ // This is currently only supported on Windows.
+ SearchBesideLibrary = 0x00000001,
+
+ AllOpenFlags = SearchBesideLibrary
+ };
+
/** Load a dynamic library into the current process.
* The returned LibraryHandle can be used to access the symbols in the
- * library. */
+ * library. The optional second argument is a set of flags to use when
+ * opening the library. If unrecognized or unsupported flags are specified,
+ * the library is not opened. */
static LibraryHandle OpenLibrary(const std::string&);
+ static LibraryHandle OpenLibrary(const std::string&, int);
/** Attempt to detach a dynamic library from the
* process. A value of true is returned if it is successful. */