网站首页  词典首页

请输入您要查询的函数:

 

术语 regflushkey
释义 RegFlushKey
语法:
C++
LONG WINAPI RegFlushKey(
__in HKEY hKey
);
RegFlushKey功能
写入到注册表中指定的打开注册表关键字的所有属性。
参数
hKey [in]
句柄到打开注册表项。密钥必须与已开放的KEY_QUERY_VALUE访问权限。有关更多信息,请参见注册表关键的安全和访问权限。
这种处理是由RegCreateKeyEx的,RegCreateKeyTransacted,RegOpenKeyEx,或RegOpenKeyTransacted函数返回。它也可以是下列预定义项之一:
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA
HKEY_USERS
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个非零错误代码Winerror.h中定义。您可以使用带有FORMAT_MESSAGE_FROM_SYSTEM标记的FormatMessage函数获得错误的一般说明。
备注
函数返回的RegFlushKey只有当所有的数据配置单元包含指定项已被写入到磁盘上的注册表中存储。该RegFlushKey函数写出在其他键的单元已被修改,因为数据上懒惰冲洗或系统启动。经过RegFlushKey回报,使用RegCloseKey关闭处理的注册表项。
调用RegFlushKey是一个昂贵的操作,严重影响性能,因为它会阻止在注册表配置单元被刷新,直到操作完成刷新修改键。此外,没有必要呼吁RegFlushKey,使其他进程可见关键的变化,因为注册表更改刷新了懒惰冲水器使用其注册到磁盘。基于这些原因,RegFlushKey应使用很少,如果有的话。
懒惰冲洗,并定期自动发生后,系统指定的时间间隔。注册表变化也刷新到磁盘的系统关机。懒惰的冲水器允许写入注册表的变化是最有效的方式管理注册表写入到磁盘上的注册表中存储。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
RegCloseKey
RegDeleteKey
登记职能
注册表概述
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegFlushKey Function
Writes all the attributes of the specified open registry key into the registry.
Syntax
C++
LONG WINAPI RegFlushKey(
__in HKEY hKey
);
Parameters
hKey [in]
A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. For more information, see Registry Key Security and Access Rights .
This handle is returned by the RegCreateKeyEx , RegCreateKeyTransacted , RegOpenKeyEx , or RegOpenKeyTransacted function. It can also be one of the following predefined keys :
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA
HKEY_USERS
Return Value
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. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
Remarks
The RegFlushKey function returns only when all the data for the hive that contains the specified key has been written to the registry store on disk. The RegFlushKey function writes out the data for other keys in the hive that have been modified since the last lazy flush or system start. After RegFlushKey returns, use RegCloseKey to close the handle to the registry key.
Calling RegFlushKey is an expensive operation that significantly affects performance because it blocks modifications to keys in the registry hive that is being flushed until the flush operation completes. In addition, it is not necessary to call RegFlushKey to make key changes visible to other processes because registry changes are flushed to disk by the registry using its lazy flusher. For these reasons, RegFlushKey should be used rarely, if ever.
Lazy flushing occurs automatically and regularly after a system-specified interval of time. Registry changes are also flushed to disk at system shutdown. Allowing the lazy flusher to write registry changes is the most efficient way to manage registry writes to the registry store on disk.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
See Also
RegCloseKey
RegDeleteKey
Registry Functions
Registry Overview
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724867(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:32:10