public class DynLoad
extends java.lang.Object
The dynload library provides an interface to load foreign dynamic libraries and access to their symbols.
| Modifier and Type | Method and Description |
|---|---|
static long |
dlFindSymbol(long pLib,
java.nio.ByteBuffer pSymbolName)
Returns a pointer to a symbol with name
pSymbolName in the library with handle pLib, 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 name
pSymbolName in the library with handle pLib, or returns a null pointer if the symbol cannot be
found. |
static void |
dlFreeLibrary(long pLib)
Frees a loaded library.
|
static int |
dlGetLibraryPath(long pLib,
java.nio.ByteBuffer sOut)
Gets a copy of the path to the library loaded with handle
pLib. |
static java.lang.String |
dlGetLibraryPath(long pLib,
int bufSize)
Gets a copy of the path to the library loaded with handle
pLib. |
static long |
dlLoadLibrary(java.nio.ByteBuffer libpath)
Loads a dynamic library at
libpath and returns a handle to it. |
static long |
dlLoadLibrary(java.lang.CharSequence libpath)
Loads a dynamic library at
libpath and returns a handle to it. |
static void |
dlSymsCleanup(long pSyms)
Frees the specified
DLSyms 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 new
DLSyms object. |
static long |
dlSymsInit(java.lang.CharSequence libPath)
Creates a new
DLSyms 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.
|
static long |
ndlFindSymbol(long pLib,
long pSymbolName)
Unsafe version of:
FindSymbol |
static void |
ndlFreeLibrary(long pLib)
Unsafe version of:
FreeLibrary |
static int |
ndlGetLibraryPath(long pLib,
long sOut,
int bufSize)
Unsafe version of:
GetLibraryPath |
static long |
ndlLoadLibrary(long libpath)
Unsafe version of:
LoadLibrary |
static void |
ndlSymsCleanup(long pSyms)
Unsafe version of:
SymsCleanup |
static int |
ndlSymsCount(long pSyms)
Unsafe version of:
SymsCount |
static long |
ndlSymsInit(long libPath)
Unsafe version of:
SymsInit |
static long |
ndlSymsName(long pSyms,
int index)
Unsafe version of:
SymsName |
static long |
ndlSymsNameFromValue(long pSyms,
long value)
Unsafe version of:
SymsNameFromValue |
public static long ndlLoadLibrary(long libpath)
LoadLibrarypublic static long dlLoadLibrary(java.nio.ByteBuffer libpath)
libpath and returns a handle to it.libpath - the dynamic library pathpublic static long dlLoadLibrary(java.lang.CharSequence libpath)
libpath and returns a handle to it.libpath - the dynamic library pathpublic static void ndlFreeLibrary(long pLib)
FreeLibrarypublic static void dlFreeLibrary(long pLib)
pLib - the dynamic library to freepublic static long ndlFindSymbol(long pLib,
long pSymbolName)
FindSymbolpublic static long dlFindSymbol(long pLib,
java.nio.ByteBuffer pSymbolName)
pSymbolName in the library with handle pLib, or returns a null pointer if the symbol cannot be
found.pLib - the dynamic librarypSymbolName - the symbol namepublic static long dlFindSymbol(long pLib,
java.lang.CharSequence pSymbolName)
pSymbolName in the library with handle pLib, or returns a null pointer if the symbol cannot be
found.pLib - the dynamic librarypSymbolName - the symbol namepublic static int ndlGetLibraryPath(long pLib,
long sOut,
int bufSize)
GetLibraryPathbufSize - the size of sOut, in bytespublic static int dlGetLibraryPath(long pLib,
java.nio.ByteBuffer sOut)
pLib.
The parameter sOut is a pointer to a buffer of size bufSize (in bytes), to hold the output string. The return value is the size of the
buffer (in bytes) needed to hold the null-terminated string, or 0 if it can't be looked up. If bufSize >= return value > 1, a null-terminated
string with the path to the library should be in sOut. If it returns 0, the library name wasn't able to be found. Please note that this might
happen in some rare cases, so make sure to always check.
pLib - the dynamic librarysOut - pointer to a buffer where the library path will be storedpublic static java.lang.String dlGetLibraryPath(long pLib,
int bufSize)
pLib.
The parameter sOut is a pointer to a buffer of size bufSize (in bytes), to hold the output string. The return value is the size of the
buffer (in bytes) needed to hold the null-terminated string, or 0 if it can't be looked up. If bufSize >= return value > 1, a null-terminated
string with the path to the library should be in sOut. If it returns 0, the library name wasn't able to be found. Please note that this might
happen in some rare cases, so make sure to always check.
pLib - the dynamic librarybufSize - the size of sOut, in bytespublic static long ndlSymsInit(long libPath)
SymsInitpublic static long dlSymsInit(java.nio.ByteBuffer libPath)
DLSyms object.libPath - the dynamic library pathpublic static long dlSymsInit(java.lang.CharSequence libPath)
DLSyms object.libPath - the dynamic library pathpublic static void ndlSymsCleanup(long pSyms)
SymsCleanuppublic static void dlSymsCleanup(long pSyms)
DLSyms object.pSyms - the DLSyms object to freepublic static int ndlSymsCount(long pSyms)
SymsCountpublic static int dlSymsCount(long pSyms)
pSyms - a DLSyms objectpublic static long ndlSymsName(long pSyms,
int index)
SymsName@Nullable
public static java.lang.String dlSymsName(long pSyms,
int index)
pSyms - a DLSyms objectpublic static long ndlSymsNameFromValue(long pSyms,
long value)
SymsNameFromValue@Nullable
public static java.lang.String dlSymsNameFromValue(long pSyms,
long value)
pSyms - a DLSyms objectvalue - the symbol addressCopyright LWJGL. All Rights Reserved. License terms.