handle = openKey(rootKey, parent, WINNT.KEY_READ);
if (handle != 0)
{
if (advapi32.RegCreateKeyEx(handle, name, 0, null, WINNT.REG_OPTION_NON_VOLATILE, WINNT.KEY_READ, null, hkResult, dwDisposition) == WINERROR.ERROR_SUCCESS)
{
ret = true;
advapi32.RegCloseKey(hkResult.getValue());
}