/* Returns: (nullable): a #GWin32RegistryKey or NULL if can't be opened. Free with g_object_unref().  */
GWin32RegistryKey* g_win32_registry_key_get_child(GWin32RegistryKey *key, const gchar *subkey, GError **error)
/* Returns: (nullable): a #GWin32RegistryKey or NULL if can't be opened. Free with g_object_unref().  */
GWin32RegistryKey* g_win32_registry_key_get_child(GWin32RegistryKey *key, const gchar *subkey, GError **error)
{
  gunichar2 *subkey_w;
  GWin32RegistryKey *result = NULL;
  g_return_val_if_fail (G_IS_WIN32_REGISTRY_KEY (key), NULL);
  g_return_val_if_fail (subkey != NULL, NULL);
  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
  subkey_w = g_utf8_to_utf16 (subkey, -1, NULL, NULL, error);
  if (subkey_w != NULL)
    {
      result = g_win32_registry_key_get_child_w (key, subkey_w, error);
      g_free (subkey_w);
    }
  return result;
}