Windows platform uses C language in user mode to change the registry and delete

Source: Internet
Author: User

WIODWS introduction of the registration form

The Windows operating system provides a central storage facility called the registry as the system's configuration and Management center. Applications and kernels access the registry to read and write various configurations. Windows also provides APIs for applications to access the registry, which, after receiving a registry access request, forwards them to the kernel's system services. The kernel then handles it accordingly.

The Widows Registry is a tree structure, and each node is a key or value. A key is a container, like a folder in a file system, where the value stores data, which is equivalent to a file system file, and the key can contain other keys (directories) or values (files). The root directory of the registry is called the root key , and the registry is generally hidden from the computer user, that is, the desktop user does not need to know the existence of the registry. However, advanced users need some tools to access the registry, and the Windows system provides a default registry Editing tool (Regedit, which is opened via the Win+r key input regedit). Software installers and applications need to manipulate the registry by invoking the Windows API.

The registry value (file) has a multiple data type, which is equivalent to the file type in the file system. These data types include: REG_DWORD (32-bit integers), REG_BINARY (binary data), and REG_SZ (string) formats. These formats are only data structures that specify values , but their storage is still binary, just as there are data structures inside a file of a certain format.

8 root keys under the top-level structure of the registry, their abbreviations and meanings are shown in table 1, where hkey_performance_<xxx> Root keys are not visible in Regedit.exe, they are performance data, not really in the registry, they actually reflect state information in memory, but Windows provides a convenient way for upper-level applications to get performance information through the registry API.

table 1 The root key of the registry
Root Key Abbreviation Description
Hkey_users HKU Account information about all the users on the machine
Hkey_local_meachin HKLM Information about the current system
HKey_Current_User HKCU Information for the current user, which is a symbolic link that points to the subkey in the HKU corresponding to the current user
HKey_Classes_Root HKCR Save the file association and COM settings information, it is hklm\software\classes
and hkcu\software\classes two sub-trees merged view
Hkey_current_config Hkcc

The Windows platform uses the C language in user mode to change the registry's additions and deletions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.