Win32 SDK Registry Operation - REGCLOSEKEY

zhaozj2021-02-08  228

RegcloseKey

(For more information, http://websl.126.com)

The RegcloseKey function releases the handle of the given button.

Long regclosekey

HKEY HKEY / / Handle to close the key

);

parameter

HKEY

To turn off the handle of the opened button.

return value

Returns Error_Success if the call is successful.

If the call fails, returns a non-zero error code (defined in WineError.h). You can use the format_message_from_syste tag formAtMessage function to get normal error description information.

note

This given handle should not be used after it shuts it because it is no longer valid. The key handle should not be shorter than the required time.

RegcloseKey does not need to write information in the registry before returning; it can take a few seconds to cache the cache area of ​​the hard disk. If an application must write registration information to the hard disk, it can use the RegflushKey function. RegflushKey, however, more system resources should be called when necessary.

The Windows CE: RegLoseKey function always returns to write information to the registry, in Windows CE to remove the needs of the cache key.

Quick information

Windows NT: It takes 3.1 or higher. Windows: Need Windows 95 or higher. Windows CE: 1.0 or higher. Header file: WinReg.h. Enter the library: Advapi32.lib.

See

REGISTRY FUNCTIONS, RegistryKey, RegcreateKeyex, RegDeleteKey, Regopenkeyex, RegSetValue, RegSetValueex

转载请注明原文地址:https://www.9cbs.com/read-3380.html

New Post(0)