- java.lang.Object
-
- de.ibapl.jnhw.winapi.Winreg
-
-
Field Summary
Fields Modifier and Type Field Description static booleanHAVE_WINREG_Hstatic WinDef.HKEYHKEY_CLASSES_ROOTHKEY_CLASSES_ROOT Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.static WinDef.HKEYHKEY_CURRENT_CONFIGHKEY_CURRENT_CONFIG Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.static WinDef.HKEYHKEY_CURRENT_USERHKEY_CURRENT_USER Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.static WinDef.HKEYHKEY_CURRENT_USER_LOCAL_SETTINGSHKEY_CURRENT_USER_LOCAL_SETTINGS Registry entries subordinate to this key define preferences of the current user that are local to the machine.static WinDef.HKEYHKEY_DYN_DATAHKEY_CLASSES_ROOT Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.static WinDef.HKEYHKEY_LOCAL_MACHINEHKEY_LOCAL_MACHINE Registry entries subordinate to this key define the physical state of the computer, including data about the bus type, system memory, and installed hardware and software.static WinDef.HKEYHKEY_PERFORMANCE_DATAHKEY_PERFORMANCE_DATA Registry entries subordinate to this key allow you to access performance data.static WinDef.HKEYHKEY_PERFORMANCE_NLSTEXTHKEY_PERFORMANCE_NLSTEXT Registry entries subordinate to this key reference the text strings that describe counters in the local language of the area in which the computer system is running.static WinDef.HKEYHKEY_PERFORMANCE_TEXTHKEY_PERFORMANCE_TEXT Registry entries subordinate to this key reference the text strings that describe counters in US English.static WinDef.HKEYHKEY_USERSHKEY_USERS Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.
-
Constructor Summary
Constructors Constructor Description Winreg()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidRegCloseKey(WinDef.HKEY hKey)RegCloseKey Closes a handle to the specified registry key.static longRegEnumValueW(WinDef.HKEY hKey, int dwIndex, Winnt.LPWSTR lpValueName, IntRef lpType, WinDef.LPBYTE lpData)RegEnumValueW Enumerates the values for the specified open registry key.The function copies one indexed value name and data block for the key each time it is called.static voidRegOpenKeyExW(WinDef.HKEY hKey, String lpSubKey, int ulOptions, int samDesired, WinDef.PHKEY phkResult)RegOpenKeyExW Opens the specified registry key.
-
-
-
Field Detail
-
HKEY_CLASSES_ROOT
@Define public static final WinDef.HKEY HKEY_CLASSES_ROOT
HKEY_CLASSES_ROOT Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.
-
HKEY_CURRENT_CONFIG
@Define public static final WinDef.HKEY HKEY_CURRENT_CONFIG
HKEY_CURRENT_CONFIG Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.
-
HKEY_CURRENT_USER
@Define public static final WinDef.HKEY HKEY_CURRENT_USER
HKEY_CURRENT_USER Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.
-
HKEY_CURRENT_USER_LOCAL_SETTINGS
@Define public static final WinDef.HKEY HKEY_CURRENT_USER_LOCAL_SETTINGS
HKEY_CURRENT_USER_LOCAL_SETTINGS Registry entries subordinate to this key define preferences of the current user that are local to the machine.
-
HKEY_DYN_DATA
@Define public static final WinDef.HKEY HKEY_DYN_DATA
HKEY_CLASSES_ROOT Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.
-
HKEY_LOCAL_MACHINE
@Define public static final WinDef.HKEY HKEY_LOCAL_MACHINE
HKEY_LOCAL_MACHINE Registry entries subordinate to this key define the physical state of the computer, including data about the bus type, system memory, and installed hardware and software.
-
HKEY_PERFORMANCE_DATA
@Define public static final WinDef.HKEY HKEY_PERFORMANCE_DATA
HKEY_PERFORMANCE_DATA Registry entries subordinate to this key allow you to access performance data.
-
HKEY_PERFORMANCE_NLSTEXT
@Define public static final WinDef.HKEY HKEY_PERFORMANCE_NLSTEXT
HKEY_PERFORMANCE_NLSTEXT Registry entries subordinate to this key reference the text strings that describe counters in the local language of the area in which the computer system is running.
-
HKEY_PERFORMANCE_TEXT
@Define public static final WinDef.HKEY HKEY_PERFORMANCE_TEXT
HKEY_PERFORMANCE_TEXT Registry entries subordinate to this key reference the text strings that describe counters in US English.
-
HKEY_USERS
@Define public static final WinDef.HKEY HKEY_USERS
HKEY_USERS Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.
-
HAVE_WINREG_H
public static boolean HAVE_WINREG_H
-
-
Method Detail
-
RegCloseKey
public static final void RegCloseKey(WinDef.HKEY hKey) throws NativeErrorException
RegCloseKey Closes a handle to the specified registry key.- Parameters:
hKey- a handle to an open registry key.- Throws:
NullPointerException- if hKey isnull.NativeErrorException- if the return value of the native function indicates an error.
-
RegEnumValueW
public static final long RegEnumValueW(WinDef.HKEY hKey, int dwIndex, Winnt.LPWSTR lpValueName, IntRef lpType, WinDef.LPBYTE lpData) throws NativeErrorException
RegEnumValueW Enumerates the values for the specified open registry key.The function copies one indexed value name and data block for the key each time it is called.- Parameters:
hKey- A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right.dwIndex- The index of the value to be retrieved. This parameter should be zero for the first call to the RegEnumValue function and then be incremented for subsequent calls.lpValueName- A pointer to a buffer that receives the name of the value as a null-terminated string.lpType- A pointer to a variable that receives a code indicating the type of data stored in the specified value. Registry Value TypeslpData- A pointer to a buffer that receives the data for the value entry. This parameter can be NULL if the data is not required.- Returns:
- ERROR_SUCCESS
- ERROR_NO_MORE_ITEMS if there are no more values available
- ERROR_MORE_DATA if the lpData buffer is too small to receive the value.
- Throws:
NullPointerException- if hKey or lpValueName or lpType isnull.NativeErrorException- if the return value of the native function indicates an error.
-
RegOpenKeyExW
public static final void RegOpenKeyExW(WinDef.HKEY hKey, String lpSubKey, int ulOptions, int samDesired, WinDef.PHKEY phkResult) throws NativeErrorException
RegOpenKeyExW Opens the specified registry key. Note that key names are not case sensitive.- Parameters:
hKey- a handle to an open registry key.lpSubKey- the name of the registry subkey to be opened.ulOptions- specifies the option to apply when opening the key. Set this parameter to zero or the following:Winnt#REG_OPTION_OPEN_LINK()samDesired- a mask that specifies the desired access rights to the key to be opened. The function fails if the security descriptor of the key does not permit the requested access for the calling process.phkResult- a pointer to a variable that receives a handle to the opened key.- Throws:
NullPointerException- if hKey or lpSubKey or phkResult isnull.NativeErrorException- if the return value of the native function indicates an error.
-
-