Class Kernel32

java.lang.Object
icyllis.modernui.core.Kernel32

public class Kernel32 extends Object
Native bindings to kernel32.dll.
  • 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 kernel32 SharedLibrary.
    • 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

      public static boolean GetHandleInformation(long hObject, IntBuffer lpdwFlags)
      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

      public static long AddDllDirectory(String NewDirectory)
      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.