~~Title: OpusRegCreateKeyW~~ OpusRegCreateKeyW && LONG && Returns **ERROR_SUCCESS** if successful or an error code on failure. && phKey && OPUSREGKEY && [in] The parent registry key (or root hive). This must either be a valid key returned by **OpusRegCreateKeyW** or [[opusregopenkeyw|OpusRegOpenKeyW]], or one of the following hive keys: |OPUSREGKEY_CLASSES_ROOT|equivalent to HKEY_CLASSES_ROOT| |OPUSREGKEY_CURRENT_USER|equivalent to HKEY_CURRENT_USER| |OPUSREGKEY_LOCAL_MACHINE|equivalent to HKEY_LOCAL_MACHINE| |OPUSREGKEY_USERS|equivalent to HKEY_USERS| && lpSubKey && LPCWSTR && [in] Path of sub-key to create or open, or **NULL** to open the parent key. && samDesired && REGSAM && [in] Access mask that specifies the desired access rights to the key. See the Windows API documentation for **RegCreateKeyEx** for more information. && phkResult && OPUSREGKEY* && [out] Pointer to a variable that receives a handle to the opened key. The **OpusRegCreateKeyW** function is used to create a new registry key, or open an existing one for writing. The key returned in //phkResult// is **not** compatible with the Windows registry API functions. You must close all key handles with [[opusregclosekey|OpusRegCloseKey]] when you are finished using the handle.