Package icyllis.modernui.core
Class Kernel32
java.lang.Object
icyllis.modernui.core.Kernel32
Native bindings to kernel32.dll.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded from the kernel32SharedLibrary. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longAddDllDirectory(String NewDirectory) Adds a directory to the process DLL search path.static booleanCloseHandle(long hObject) Closes an open object handle.static booleanGetHandleInformation(long hObject, IntBuffer lpdwFlags) Retrieves certain properties of an object handle.static intRetrieves the calling thread's last-error code value.static org.lwjgl.system.SharedLibraryReturns the kernel32SharedLibrary.
-
Field Details
-
HANDLE_FLAG_INHERIT
public static final int HANDLE_FLAG_INHERIT- See Also:
-
HANDLE_FLAG_PROTECT_FROM_CLOSE
public static final int HANDLE_FLAG_PROTECT_FROM_CLOSE- See Also:
-
-
Constructor Details
-
Kernel32
public Kernel32()
-
-
Method Details
-
getLibrary
public static org.lwjgl.system.SharedLibrary getLibrary()Returns the kernel32SharedLibrary. -
CloseHandle
public static boolean CloseHandle(long hObject) Closes an open object handle.- Parameters:
hObject- A valid handle to an open object.- Returns:
- If the function succeeds, the return value is nonzero.
-
GetHandleInformation
Retrieves certain properties of an object handle.- Parameters:
hObject- A handle to an object whose information is to be retrieved.lpdwFlags- A pointer to a variable that receives a set of bit flags that specify properties of the object handle or 0.- Returns:
- If the function succeeds, the return value is nonzero.
-
GetLastError
public static int GetLastError()Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each other's last-error code.- Returns:
- The return value is the calling thread's last-error code.
-
AddDllDirectory
Adds a directory to the process DLL search path.- Parameters:
NewDirectory- An absolute path to the directory to add to the search path.- Returns:
- If the function fails, the return value is zero.
-