The RegOpenKey function opens the specified key. This function is provided for compatibility with Windows version 3.1. Win32-based applications should use the RegOpenKeyEx function.
LONG RegOpenKey(
HKEY hKey, |
// handle of open key |
LPCTSTR lpSubKey, |
// address of name of subkey to open |
PHKEY phkResult |
// address of handle of open key |
); |
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
Windows NT only: HKEY_PERFORMANCE_DATA
Windows 95 only: HKEY_DYN_DATA
The key opened by the RegOpenKey function is a subkey of the key
identified by hKey.
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.
The RegOpenKey function uses the default security access mask to open a key. If opening the key requires a different mask, the function fails, returning ERROR_ACCESS_DENIED. An application should use the RegOpenKeyEx function to specify an access mask in this situation.
Unlike the RegCreateKey function, RegOpenKey does not create the specified key if the key does not exist in the database.
RegCloseKey, RegCreateKey, RegCreateKeyEx, RegDeleteKey, RegOpenKeyEx
file: /Techref/os/win/api/win32/func/src/f73_3.htm, 3KB, , updated: 2000/4/7 11:19, local time: 2024/12/2 03:33,
3.139.108.99:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/Techref/os/win/api/win32/func/src/f73_3.htm"> RegOpenKey</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.