com.jniwrapper.win32
Class Kernel32

java.lang.Object
  |
  +--com.jniwrapper.util.FunctionCache
        |
        +--com.jniwrapper.win32.WinFunctionCache
              |
              +--com.jniwrapper.win32.Kernel32

public class Kernel32
extends WinFunctionCache

This class provides functions from Kernel32 library.


Method Summary
static Function get(java.lang.Object functionName)
           
static Kernel32 getInstance()
           
 boolean isUnicode()
          Says if ANSI or Unicode functions should be used.
 void setUnicode(boolean unicode)
          Instructs the cache use Unicode or ANSI functions and parameter types.
 
Methods inherited from class com.jniwrapper.win32.WinFunctionCache
getFunction, stringParam, stringParam, stringParam, stringParam
 
Methods inherited from class com.jniwrapper.util.FunctionCache
getFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isUnicode

public boolean isUnicode()
Says if ANSI or Unicode functions should be used.

Detects the platform if this wasn't done before, or property wasn't explicitely modified directly via setUnicode(). If the property wasn't set explicitely, assumes that Unicode should be used if the underlying OS is NT-based.

NOTE: Since the Unicode support detection is based on platform version detection, which itself requires Kernel32 instance, the deteciton cannot be permormed in the constructor to prevent recursion, and should be delayed until actually queried.

Overrides:
isUnicode in class WinFunctionCache
Returns:
true if Unicode versions of functions should be used.

setUnicode

public void setUnicode(boolean unicode)
Description copied from class: WinFunctionCache
Instructs the cache use Unicode or ANSI functions and parameter types.

Overrides:
setUnicode in class WinFunctionCache
Parameters:
unicode - if true Unicode names and types will be used, otherwise ANSI.

getInstance

public static Kernel32 getInstance()

get

public static Function get(java.lang.Object functionName)