#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>


LONG APIENTRY
RegCreateKey(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
{
	char *subkey;
	LONG l;

	if(win_useunicode)
		return RegCreateKeyW(hKey, lpSubKey, phkResult);

	subkey = win_wstr2utf(lpSubKey);
	l = RegCreateKeyA(hKey, subkey, phkResult);
	win_free(subkey);
	return l;
}
