Contents Index Topic Contents | ||
Previous Topic: SHQueryValueEx Next Topic: SHRegDeleteEmptyUSKey |
SHRegCreateUSKey
LONG SHRegCreateUSKey( LPCTSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, DWORD dwFlags );Creates or opens a user-specific registry key.
- Returns ERROR_SUCCESS if successful, or a nonzero error code defined in Winerror.h otherwise. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
- pszPath
- Address of a character buffer that contains the registry path of the key to be created or opened.
- samDesired
- Desired security access. For more information on security access, see REGSAM.
- hRelativeUSKey
- Data that indicates which type of HUSKEY to create.
- phNewUSKey
- Address of an HUSKEY that receive the handle to the new key.
- dwFlags
- Base key under which the key should be opened. This can be one or more of the following values:
SHREGSET_HKCU Create/open the key under HKEY_CURRENT_USER. SHREGSET_HKLM Create/open the key under HKEY_LOCAL_MACHINE. SHREGSET_DEFAULT Create/open the key under both HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.