public class WinBase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FALSE
BOOL return values.
|
static int |
TRUE
BOOL return values.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
FreeLibrary(long handle)
Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.
|
static int |
getLastError()
Retrieves the calling thread's last-error code value.
|
static int |
GetLastError()
Retrieves the calling thread's last-error code value.
|
static long |
GetModuleHandle(java.nio.ByteBuffer moduleName)
Retrieves a module handle for the specified module.
|
static long |
GetModuleHandle(java.lang.CharSequence moduleName)
Retrieves a module handle for the specified module.
|
static long |
GetProcAddress(long handle,
java.nio.ByteBuffer name)
Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
|
static long |
GetProcAddress(long handle,
java.lang.CharSequence name)
Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
|
static long |
LoadLibrary(java.nio.ByteBuffer name)
Loads the specified module into the address space of the calling process.
|
static long |
LoadLibrary(java.lang.CharSequence name)
Loads the specified module into the address space of the calling process.
|
static int |
nFreeLibrary(long handle)
Unsafe version of:
FreeLibrary(long) |
static long |
nGetModuleHandle(long moduleName)
Unsafe version of:
GetModuleHandle(java.nio.ByteBuffer) |
static long |
nGetProcAddress(long handle,
long name)
Unsafe version of:
GetProcAddress(long, java.nio.ByteBuffer) |
static long |
nLoadLibrary(long name)
Unsafe version of:
LoadLibrary(java.nio.ByteBuffer) |
public static final int FALSE
public static final int TRUE
public static int GetLastError()
LWJGL note: This function cannot be used after another JNI call to a Windows function, because the last error resets before that call returns.
For this reason, LWJGL stores the last error in thread-local storage, you can use getLastError() to access it.
public static int getLastError()
LWJGL note: This method has a meaningful value only after another LWJGL JNI call. It does not call GetLastError() from WinBase.h, it
returns the thread-local error code stored by a previous JNI call.
public static long nGetModuleHandle(long moduleName)
GetModuleHandle(java.nio.ByteBuffer)public static long GetModuleHandle(@Nullable
java.nio.ByteBuffer moduleName)
moduleName - the name of the loaded module (either a .dll or .exe file). If the file name extension is omitted, the default library extension .dll is appended.
The file name string can include a trailing point character (.) to indicate that the module name has no extension. The string does not have to
specify a path. When specifying a path, be sure to use backslashes (\), not forward slashes (/). The name is compared (case independently) to the
names of modules currently mapped into the address space of the calling process.
If this parameter is NULL, GetModuleHandle returns a handle to the file used to create the calling process (.exe file).
public static long GetModuleHandle(@Nullable
java.lang.CharSequence moduleName)
moduleName - the name of the loaded module (either a .dll or .exe file). If the file name extension is omitted, the default library extension .dll is appended.
The file name string can include a trailing point character (.) to indicate that the module name has no extension. The string does not have to
specify a path. When specifying a path, be sure to use backslashes (\), not forward slashes (/). The name is compared (case independently) to the
names of modules currently mapped into the address space of the calling process.
If this parameter is NULL, GetModuleHandle returns a handle to the file used to create the calling process (.exe file).
public static long nLoadLibrary(long name)
LoadLibrary(java.nio.ByteBuffer)public static long LoadLibrary(java.nio.ByteBuffer name)
name - the name of the module. This can be either a library module (a .dll file) or an executable module (an .exe file). The name specified is the file
name of the module and is not related to the name stored in the library module itself, as specified by the LIBRARY keyword in the module-definition
(.def) file.
If the string specifies a full path, the function searches only that path for the module.
If the string specifies a relative path or a module name without a path, the function uses a standard search strategy to find the module.
If the function cannot find the module, the function fails. When specifying a path, be sure to use backslashes (\), not forward slashes (/).
If the string specifies a module name without a path and the file name extension is omitted, the function appends the default library extension .dll to the module name. To prevent the function from appending .dll to the module name, include a trailing point character (.) in the module name string.
public static long LoadLibrary(java.lang.CharSequence name)
name - the name of the module. This can be either a library module (a .dll file) or an executable module (an .exe file). The name specified is the file
name of the module and is not related to the name stored in the library module itself, as specified by the LIBRARY keyword in the module-definition
(.def) file.
If the string specifies a full path, the function searches only that path for the module.
If the string specifies a relative path or a module name without a path, the function uses a standard search strategy to find the module.
If the function cannot find the module, the function fails. When specifying a path, be sure to use backslashes (\), not forward slashes (/).
If the string specifies a module name without a path and the file name extension is omitted, the function appends the default library extension .dll to the module name. To prevent the function from appending .dll to the module name, include a trailing point character (.) in the module name string.
public static long nGetProcAddress(long handle,
long name)
GetProcAddress(long, java.nio.ByteBuffer)public static long GetProcAddress(long handle,
java.nio.ByteBuffer name)
handle - a handle to the DLL module that contains the function or variablename - the function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the
high-order word must be zero.public static long GetProcAddress(long handle,
java.lang.CharSequence name)
handle - a handle to the DLL module that contains the function or variablename - the function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the
high-order word must be zero.public static int nFreeLibrary(long handle)
FreeLibrary(long)public static boolean FreeLibrary(long handle)
handle - a handle to the loaded library moduleCopyright LWJGL. All Rights Reserved. License terms.