aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os/NativeLibrary.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/common/os/NativeLibrary.java')
-rwxr-xr-xsrc/java/com/jogamp/common/os/NativeLibrary.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java
index 2de8bc9..897e240 100755
--- a/src/java/com/jogamp/common/os/NativeLibrary.java
+++ b/src/java/com/jogamp/common/os/NativeLibrary.java
@@ -122,6 +122,10 @@ public class NativeLibrary implements DynamicLookupHelper {
this.libraryPath = libraryPath;
}
+ public String toString() {
+ return "NativeLibrary[" + libraryPath + ", 0x" + Long.toHexString(libraryHandle) + "]";
+ }
+
/** Opens the given native library, assuming it has the same base
name on all platforms, looking first in the system's search
path, and in the context of the specified ClassLoader, which is
@@ -209,6 +213,11 @@ public class NativeLibrary implements DynamicLookupHelper {
return dynLink.lookupSymbol(libraryHandle, funcName);
}
+ /** Looks up the given function name in all loaded libraries. */
+ public static long dynamicLookupFunctionGlobal(String funcName) {
+ return dynLink.lookupSymbolGlobal(funcName);
+ }
+
/** Retrieves the low-level library handle from this NativeLibrary
object. On the Windows platform this is an HMODULE, and on Unix
and Mac OS X platforms the void* result of calling dlopen(). */