Win32 SDK Registry Operation - REGOPENKEY

zhaozj2021-02-08  221

Regopenkey

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

The RegopenKey function opens a given button. This function is compatible with Windows 3.1. Win32-based applications should use the RegopenKeyEx function.

Long regopenkey (HKEY HKEY, // Handle to open the key LPCTSTR LPSUBKKKKKEY, / / ​​/ / To open the address of the name of the subkey Phkey phkResult // to open the address of the handle of the key);

parameter

HKEY

The handle of the current open button or the following already determined reserved handle value:

HKEY_CLASS_ROTHKEY_CURRENT_CONFIGHKEY_CURRENT_USERHKEY_LOCAL_MACHINEHKEY_USERSWINDOWS NT: HKEY_PERFORMANCE_DATA Windows 95 and Windows 98: HKEY_DYN_DATA

Opening by the Regopenkey function is a subkey that can be identified by HKEY.

LPSUBKEY

Point to a string that contains empty characters over the name to open. This button must be

The child key of the HKEY parameter identification. If this parameter is NULL or pointing to an empty string, the function returns the same handle as the pass.

PhkResult

Point a variable that receives the hosted button. When you no longer need to return your handle, call

The Regclosekey function is turned off.

return value

Returns Error_Success if the call is successful.

If the call fails, a non-zero error code is returned (defined in WineError.h). You can use the FormatMessage function with the format_message_from_system tag to get normal error description information.

note

The RegopenKey function opens a key using the default secure access mask. If the open button needs a different mask, the function will have an error, return ERROR_ACCESS_DENIED. In this case, an application should use the RegopenKeyEx function to specify an access mask.

For the regcreatekey function, if the key does not exist in the database, RegopenKey cannot create a given button.

Quick information

Windows NT: It takes 3.1 or higher. Windows: Need Windows 95 or higher. Windows CE: does not support. Document header: WinReg.h. Enter the library: Advapi32.lib. Unicode: Performed in Unicode and ANSI in Windows NT.

See

Registry Overview, Registry, RegcReatekey, RegcreateKeyex, RegdeleteKey, Regopenkeyex, REGDELETEKEY, REGDELETEKEY, REGDELETEKEY,

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

New Post(0)