/* Returns: (nullable) (transfer full): a #GWin32RegistryKey or NULL if can't be opened. Free with g_object_unref().  */
GWin32RegistryKey* g_win32_registry_key_new_w(const gunichar2 *path, GError **error)
/* Returns: (nullable) (transfer full): a #GWin32RegistryKey or NULL if can't be opened. Free with g_object_unref().  */
GWin32RegistryKey* g_win32_registry_key_new_w(const gunichar2 *path, GError **error)
{
  GObject *result;
  g_return_val_if_fail (path != NULL, NULL);
  result = g_initable_new (G_TYPE_WIN32_REGISTRY_KEY,
                           NULL,
                           error,
                           "path-utf16",
                           g_wcsdup (path, -1),
                           NULL);
  return result ? G_WIN32_REGISTRY_KEY (result) : NULL;
}