注册表操作API 目录

Registry Functions(注册表操作API)
2008/08/06 22:43
来源: MSDN

关键字: 注册表 API

前置知识: API

PS:这里仅仅列出API,具体用法,大家可以去点击相应链接查询

Registry Functions


The following are the registry functions.

FunctionDescription
GetSystemRegistryQuotaRetrieves the current size of the registry and the maximum size that the registry is allowed to attain on the system.
RegCloseKeyCloses a handle to the specified registry key.
RegConnectRegistryEstablishes a connection to a predefined registry handle on another computer.
RegCopyTreeCopies the specified registry key, along with its values and subkeys, to the specified destination key.
RegCreateKeyExCreates the specified registry key.
RegCreateKeyTransactedCreates the specified registry key and associates it with a transaction.
RegDeleteKeyDeletes a subkey and its values.
RegDeleteKeyExDeletes a subkey and its values from the specified platform-specific view of the registry.
RegDeleteKeyTransactedDeletes a subkey and its values from the specified platform-specific view of the registry as a transacted operation.
RegDeleteKeyValueRemoves the specified value from the specified registry key and subkey.
RegDeleteTreeDeletes the subkeys and values of the specified key recursively.
RegDeleteValueRemoves a named value from the specified registry key.
RegDisablePredefinedCacheDisables handle caching for the predefined registry handle for HKEY_CURRENT_USER for the current process.
RegDisablePredefinedCacheExDisables handle caching for all predefined registry handles for the current process.
RegDisableReflectionKeyDisables registry reflection for the specified key.
RegEnableReflectionKeyEnables registry reflection for the specified disabled key.
RegEnumKeyExEnumerates the subkeys of the specified open registry key.
RegEnumValueEnumerates the values for the specified open registry key.
RegFlushKeyWrites all attributes of the specified open registry key into the registry.
RegGetKeySecurityRetrieves a copy of the security descriptor protecting the specified open registry key.
RegGetValueRetrieves the type and data for the specified registry value.
RegLoadKeyCreates a subkey under HKEY_USERS or HKEY_LOCAL_MACHINE and stores registration information from a specified file into that subkey.
RegLoadMUIStringLoads the specified string from the specified key and subkey.
RegNotifyChangeKeyValueNotifies the caller about changes to the attributes or contents of a specified registry key.
RegOpenCurrentUserRetrieves a handle to the HKEY_CURRENT_USER key for the user the current thread is impersonating.
RegOpenKeyExOpens the specified registry key.
RegOpenKeyTransactedOpens the specified registry key and associates it with a transaction.
RegOpenUserClassesRootRetrieves a handle to the HKEY_CLASSES_ROOT key for the specified user.
RegOverridePredefKeyMaps a predefined registry key to a specified registry key.
RegQueryInfoKeyRetrieves information about the specified registry key.
RegQueryMultipleValuesRetrieves the type and data for a list of value names associated with an open registry key.
RegQueryReflectionKeyDetermines whether reflection has been disabled or enabled for the specified key.
RegQueryValueExRetrieves the type and data for a specified value name associated with an open registry key.
RegReplaceKeyReplaces the file backing a registry key and all its subkeys with another file.
RegRestoreKeyReads the registry information in a specified file and copies it over the specified key.
RegSaveKeySaves the specified key and all of its subkeys and values to a new file.
RegSaveKeyExSaves the specified key and all of its subkeys and values to a new file. You can specify the format for the saved key or hive.
RegSetKeyValueSets the data for the specified value in the specified registry key and subkey.
RegSetKeySecuritySets the security of an open registry key.
RegSetValueExSets the data and type of a specified value under a registry key.
RegUnLoadKeyUnloads the specified registry key and its subkeys from the registry.

The following shell functions can be used with the registry:

 

The following are the initialization-file functions. They retrieve information from and copy information to a system- or application-defined initialization file. These functions are provided only for compatibility with 16-bit versions of Windows. New applications should use the registry.

FunctionDescription
GetPrivateProfileIntRetrieves an integer associated with a key in the specified section of an initialization file.
GetPrivateProfileSectionRetrieves all the keys and values for the specified section of an initialization file.
GetPrivateProfileSectionNamesRetrieves the names of all sections in an initialization file.
GetPrivateProfileStringRetrieves a string from the specified section in an initialization file.
GetPrivateProfileStructRetrieves the data associated with a key in the specified section of an initialization file.
GetProfileIntRetrieves an integer from a key in the specified section of the Win.ini file.
GetProfileSectionRetrieves all the keys and values for the specified section of the Win.ini file.
GetProfileStringRetrieves the string associated with a key in the specified section of the Win.ini file.
WritePrivateProfileSectionReplaces the keys and values for the specified section in an initialization file.
WritePrivateProfileStringCopies a string into the specified section of an initialization file.
WritePrivateProfileStructCopies data into a key in the specified section of an initialization file.
WriteProfileSectionReplaces the contents of the specified section in the Win.ini file with specified keys and values.
WriteProfileStringCopies a string into the specified section of the Win.ini file.
Obsolete Functions

These functions are provided only for compatibility with 16-bit versions of Windows:

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值