* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
/*
* TODO:
- * - Implement RegDeleteKey()
+ * - Implement RegDeleteKeyW()
* - Implement RegEnumValue()
- * - Implement RegQueryValueExA()
+ * - Implement RegQueryValueExW()
*/
#include <stdlib.h>
}
LONG WINAPI
-RegDeleteKeyA(HKEY Key,
- LPCSTR Name)
+RegDeleteKeyW(
+ IN HKEY hKey,
+ IN LPCWSTR lpSubKey)
+{
+ DPRINT1("FIXME!\n");
+ return ERROR_SUCCESS;
+}
+
+LONG WINAPI
+RegDeleteKeyA(
+ IN HKEY hKey,
+ IN LPCSTR lpSubKey)
{
- if (Name != NULL && strchr(Name, '\\') != NULL)
- return(ERROR_INVALID_PARAMETER);
+ PWSTR lpSubKeyW = NULL;
+ LONG rc;
- DPRINT1("FIXME!\n");
+ if (lpSubKey != NULL && strchr(lpSubKey, '\\') != NULL)
+ return ERROR_INVALID_PARAMETER;
- return(ERROR_SUCCESS);
+ if (lpSubKey)
+ {
+ lpSubKeyW = MultiByteToWideChar(lpSubKey);
+ if (!lpSubKeyW)
+ return ERROR_OUTOFMEMORY;
+ }
+
+ rc = RegDeleteKeyW(hKey, lpSubKeyW);
+
+ if (lpSubKey)
+ free(lpSubKeyW);
+
+ return rc;
}
LONG WINAPI