diff options
author | Sven Gothel <[email protected]> | 2009-06-05 03:15:12 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-06-05 03:15:12 +0000 |
commit | b1be10c6b8e7aded4883060f5f0c3ede8b869c69 (patch) | |
tree | a9eeb9af5292c892c66d268a84d5d038a71db9e7 /src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java | |
parent | 18dce8e4df9eb4e21c5a3d1a0085ed707c018fa6 (diff) |
Adding debug flag to native dynamic linker
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@141 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java')
-rwxr-xr-x | src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java b/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java index 45cb289..325078b 100755 --- a/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java +++ b/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java @@ -22,13 +22,19 @@ public class WindowsDynamicLinkerImpl implements DynamicLinker // --- Begin CustomJavaCode .cfg declarations - public long openLibraryLocal(String libraryName) { + public long openLibraryLocal(String libraryName, boolean debug) { // How does that work under Windows ? - return LoadLibraryW(libraryName); + // Don't know .. so it's an alias for the time being + return openLibraryGlobal(libraryName, debug); } - public long openLibraryGlobal(String libraryName) { - return LoadLibraryW(libraryName); + public long openLibraryGlobal(String libraryName, boolean debug) { + long handle = LoadLibraryW(libraryName); + if(0==handle && debug) { + int err = GetLastError(); + System.err.println("LoadLibraryW \""+libraryName+"\" failed, error code: 0x"+Integer.toHexString(err)+", "+err); + } + return handle; } public long lookupSymbol(long libraryHandle, String symbolName) { |