On 23 Feb 2005 13:57:08 +0100, Alexandre Julliard <[EMAIL PROTECTED]> wrote: > James Hawkins <[EMAIL PROTECTED]> writes: > > > + /* a key cannot be created directly beneath HKEY_LOCAL_MACHINE or > > HKEY_USERS */ > > + if ((hkey == HKEY_LOCAL_MACHINE || hkey == HKEY_USERS) && > > !strchr(name, '\\')) { > > + *retkey = NULL; > > + return ERROR_INVALID_PARAMETER; > > + } > > > + if (!(ret = RegOpenKeyExW( hkey, name, 0, KEY_ENUMERATE_SUB_KEYS, &tmp > > ))) > > { > > + /* check for any subkeys > > + * a key cannot be deleted if it has any subkeys > > + */ > > + RegQueryInfoKeyW(tmp, NULL, NULL, NULL, &numSubKeys, NULL, NULL, > > NULL, NULL, NULL, NULL, NULL); > > + if (numSubKeys != 0) { > > + if (*name) RegCloseKey(tmp); > > + return ERROR_ACCESS_DENIED; > > + } > > These kinds of checks should be done in the lower level functions, not > in advapi32 (and in the case of the delete, are done already AFAICT). > > -- > Alexandre Julliard > [EMAIL PROTECTED] >
By lower level functions do you mean the ntdll reg functions? -- James Hawkins