diff options
Diffstat (limited to 'src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java')
-rw-r--r-- | src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java b/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java index 04f13fb..a99cb35 100644 --- a/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java +++ b/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java @@ -41,6 +41,9 @@ public final class WindowsDynamicLinkerImpl extends DynamicLinkerImpl { /** Interface to C language function: <br> <code> HANDLE LoadLibraryW(LPCWSTR lpLibFileName); </code> */ private static native long LoadLibraryW(java.lang.String lpLibFileName); + /** Interface to C language function: <br> <code> PROC GetModuleFileNameA(HANDLE hModule, LPSTR lpFilename, DWORD nSize); </code> */ + private static native java.lang.String GetModuleFileNameA(long hModule); + @Override protected final long openLibraryLocalImpl(final String libraryName) throws SecurityException { // How does that work under Windows ? @@ -54,6 +57,12 @@ public final class WindowsDynamicLinkerImpl extends DynamicLinkerImpl { } @Override + protected final String lookupLibraryPathnameImpl(final long libraryHandle, final String symbolName) throws SecurityException { + // symbolName is not required + return 0 != libraryHandle ? GetModuleFileNameA(libraryHandle) : null; + } + + @Override protected final long lookupSymbolGlobalImpl(final String symbolName) throws SecurityException { if(DEBUG_LOOKUP) { System.err.println("lookupSymbolGlobal: Not supported on Windows"); |