本文整理汇总了Java中com.sun.jna.platform.win32.WinBase.FILETIME属性的典型用法代码示例。如果您正苦于以下问题:Java WinBase.FILETIME属性的具体用法?Java WinBase.FILETIME怎么用?Java WinBase.FILETIME使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.jna.platform.win32.WinBase
的用法示例。
在下文中一共展示了WinBase.FILETIME属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSubKeys
/**
* Get all sub keys of a key.
*
* @param rootKey
* root key
* @param parent
* key name
* @return array with all sub key names
*/
public static String[] getSubKeys(REGISTRY_ROOT_KEY rootKey, String parent)
{
Advapi32 advapi32;
HKEY handle = null;
int dwIndex;
char[] lpName;
IntByReference lpcName;
WinBase.FILETIME lpftLastWriteTime;
TreeSet<String> subKeys = new TreeSet<String>();
advapi32 = Advapi32.INSTANCE;
handle = openKey(rootKey, parent, WinNT.KEY_READ);
lpName = new char[256];
lpcName = new IntByReference(256);
lpftLastWriteTime = new WinNT.FILETIME();
if (handle != null)
{
dwIndex = 0;
while (advapi32.RegEnumKeyEx(handle, dwIndex, lpName, lpcName, null, null, null, lpftLastWriteTime) == WINERROR.ERROR_SUCCESS)
{
subKeys.add(new String(lpName, 0, lpcName.getValue()));
lpcName.setValue(256);
dwIndex++;
}
advapi32.RegCloseKey(handle);
}
return (subKeys.toArray(new String[]
{}));
}
示例2: SP_DRVINFO_DATA
public SP_DRVINFO_DATA() {
DriverDate = new WinBase.FILETIME();
}
示例3: RegQueryInfoKey
/**
* The RegQueryInfoKey function retrieves information about the specified
* registry key.
*
* @param hKey
* A handle to an open key. The key must have been opened with
* the KEY_QUERY_VALUE access right.
* @param lpClass
* A pointer to a buffer that receives the null-terminated class
* string of the key. This parameter can be ignored. This
* parameter can be NULL.
* @param lpcClass
* A pointer to a variable that specifies the size of the buffer
* pointed to by the lpClass parameter, in characters.
* @param lpReserved
* Reserved; must be NULL.
* @param lpcSubKeys
* A pointer to a variable that receives the number of subkeys
* that are contained by the specified key. This parameter can be
* NULL.
* @param lpcMaxSubKeyLen
* A pointer to a variable that receives the size of the key's
* subkey with the longest name, in characters, not including the
* terminating null character. This parameter can be NULL.
* @param lpcMaxClassLen
* A pointer to a variable that receives the size of the longest
* string that specifies a subkey class, in characters. The count
* returned does not include the terminating null character. This
* parameter can be NULL.
* @param lpcValues
* A pointer to a variable that receives the number of values
* that are associated with the key. This parameter can be NULL.
* @param lpcMaxValueNameLen
* A pointer to a variable that receives the size of the key's
* longest value name, in characters. The size does not include
* the terminating null character. This parameter can be NULL.
* @param lpcMaxValueLen
* A pointer to a variable that receives the size of the longest
* data component among the key's values, in bytes. This
* parameter can be NULL.
* @param lpcbSecurityDescriptor
* A pointer to a variable that receives the size of the key's
* security descriptor, in bytes. This parameter can be NULL.
* @param lpftLastWriteTime
* A pointer to a FILETIME structure that receives the last write
* time. This parameter can be NULL.
* @return If the function succeeds, the return value is ERROR_SUCCESS. If
* the function fails, the return value is a nonzero error code
* defined in Winerror.h.
*/
public int RegQueryInfoKey(HKEY hKey, char[] lpClass,
IntByReference lpcClass, IntByReference lpReserved,
IntByReference lpcSubKeys, IntByReference lpcMaxSubKeyLen,
IntByReference lpcMaxClassLen, IntByReference lpcValues,
IntByReference lpcMaxValueNameLen, IntByReference lpcMaxValueLen,
IntByReference lpcbSecurityDescriptor,
WinBase.FILETIME lpftLastWriteTime);
示例4: RegEnumKeyEx
/**
* The RegEnumKeyEx function enumerates subkeys of the specified open
* registry key. The function retrieves information about one subkey each
* time it is called.
*
* @param hKey
* Handle to an open key. The key must have been opened with the
* KEY_ENUMERATE_SUB_KEYS access right.
* @param dwIndex
* Index of the subkey to retrieve. This parameter should be zero
* for the first call to the RegEnumKeyEx function and then
* incremented for subsequent calls. Because subkeys are not
* ordered, any new subkey will have an arbitrary index. This
* means that the function may return subkeys in any order.
* @param lpName
* Pointer to a buffer that receives the name of the subkey,
* including the terminating null character. The function copies
* only the name of the subkey, not the full key hierarchy, to
* the buffer.
* @param lpcName
* Pointer to a variable that specifies the size of the buffer
* specified by the lpName parameter, in TCHARs. This size should
* include the terminating null character. When the function
* returns, the variable pointed to by lpcName contains the
* number of characters stored in the buffer. The count returned
* does not include the terminating null character.
* @param reserved
* Reserved; must be NULL.
* @param lpClass
* Pointer to a buffer that receives the null-terminated class
* string of the enumerated subkey. This parameter can be NULL.
* @param lpcClass
* Pointer to a variable that specifies the size of the buffer
* specified by the lpClass parameter, in TCHARs. The size should
* include the terminating null character. When the function
* returns, lpcClass contains the number of characters stored in
* the buffer. The count returned does not include the
* terminating null character. This parameter can be NULL only if
* lpClass is NULL.
* @param lpftLastWriteTime
* Pointer to a variable that receives the time at which the
* enumerated subkey was last written.
* @return If the function succeeds, the return value is ERROR_SUCCESS. If
* the function fails, the return value is a nonzero error code
* defined in Winerror.h.
*/
public int RegEnumKeyEx(HKEY hKey, int dwIndex, char[] lpName,
IntByReference lpcName, IntByReference reserved, char[] lpClass,
IntByReference lpcClass, WinBase.FILETIME lpftLastWriteTime);