Package org.lwjgl.system.dyncall
Class DynLoad
- java.lang.Object
-
- org.lwjgl.system.dyncall.DynLoad
-
public class DynLoad extends java.lang.Object
Native bindings to \"dynload.h\".The dynload library provides an interface to load foreign dynamic libraries and access to their symbols.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static long
dlFindSymbol(long pLib, java.nio.ByteBuffer pSymbolName)
Returns a pointer to a symbol with namepSymbolName
in the library with handlepLib
, or returns a null pointer if the symbol cannot be found.static long
dlFindSymbol(long pLib, java.lang.CharSequence pSymbolName)
Returns a pointer to a symbol with namepSymbolName
in the library with handlepLib
, or returns a null pointer if the symbol cannot be found.static void
dlFreeLibrary(long pLib)
Frees a loaded library.static long
dlLoadLibrary(java.nio.ByteBuffer libpath)
Loads a dynamic library atlibpath
and returns a handle to it.static long
dlLoadLibrary(java.lang.CharSequence libpath)
Loads a dynamic library atlibpath
and returns a handle to it.static void
dlSymsCleanup(long pSyms)
Frees the specifiedDLSyms
object.static int
dlSymsCount(long pSyms)
Returns the number of symbols exported by the specified library.static long
dlSymsInit(java.nio.ByteBuffer libPath)
Creates a newDLSyms
object.static long
dlSymsInit(java.lang.CharSequence libPath)
Creates a newDLSyms
object.static java.lang.String
dlSymsName(long pSyms, int index)
Returns the symbol name exported by the specified library at the specified index.static java.lang.String
dlSymsNameFromValue(long pSyms, long value)
Returns the symbol name exported by the specified library at the specified address.
-
-
-
Method Detail
-
dlLoadLibrary
public static long dlLoadLibrary(java.nio.ByteBuffer libpath)
Loads a dynamic library atlibpath
and returns a handle to it.- Parameters:
libpath
- the dynamic library path
-
dlLoadLibrary
public static long dlLoadLibrary(java.lang.CharSequence libpath)
Loads a dynamic library atlibpath
and returns a handle to it.- Parameters:
libpath
- the dynamic library path
-
dlFreeLibrary
public static void dlFreeLibrary(long pLib)
Frees a loaded library.- Parameters:
pLib
- the dynamic library to free
-
dlFindSymbol
public static long dlFindSymbol(long pLib, java.nio.ByteBuffer pSymbolName)
Returns a pointer to a symbol with namepSymbolName
in the library with handlepLib
, or returns a null pointer if the symbol cannot be found.- Parameters:
pLib
- the dynamic librarypSymbolName
- the symbol name
-
dlFindSymbol
public static long dlFindSymbol(long pLib, java.lang.CharSequence pSymbolName)
Returns a pointer to a symbol with namepSymbolName
in the library with handlepLib
, or returns a null pointer if the symbol cannot be found.- Parameters:
pLib
- the dynamic librarypSymbolName
- the symbol name
-
dlSymsInit
public static long dlSymsInit(java.nio.ByteBuffer libPath)
Creates a newDLSyms
object.- Parameters:
libPath
- the dynamic library path
-
dlSymsInit
public static long dlSymsInit(java.lang.CharSequence libPath)
Creates a newDLSyms
object.- Parameters:
libPath
- the dynamic library path
-
dlSymsCleanup
public static void dlSymsCleanup(long pSyms)
Frees the specifiedDLSyms
object.- Parameters:
pSyms
- theDLSyms
object to free
-
dlSymsCount
public static int dlSymsCount(long pSyms)
Returns the number of symbols exported by the specified library.- Parameters:
pSyms
- aDLSyms
object
-
dlSymsName
public static java.lang.String dlSymsName(long pSyms, int index)
Returns the symbol name exported by the specified library at the specified index.- Parameters:
pSyms
- aDLSyms
objectindex
-
-
dlSymsNameFromValue
public static java.lang.String dlSymsNameFromValue(long pSyms, long value)
Returns the symbol name exported by the specified library at the specified address.- Parameters:
pSyms
- aDLSyms
objectvalue
- the symbol address
-
-