Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / icall-windows-uwp.c
index f43e22f5d39ff47fc302bcafec9d7d9be1c04c1b..918510b1c7b9d66a741a1e798f0ba871b733505c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * icall-windows-uwp.c: UWP icall support for Mono.
+/**
+ * \file
+ * UWP icall support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
 #include <windows.h>
 #include "mono/metadata/icall-windows-internals.h"
 
-MonoString *
-mono_icall_get_machine_name (void)
+MonoStringHandle
+mono_icall_get_machine_name (MonoError *error)
 {
        g_unsupported_api ("GetComputerName");
-       return mono_string_new (mono_domain_get (), "mono");
+       return mono_string_new_handle (mono_domain_get (), "mono", error);
 }
 
-MonoString *
-mono_icall_get_windows_folder_path (int folder)
+MonoStringHandle
+mono_icall_get_windows_folder_path (int folder, MonoError *error)
 {
+       error_init (error);
        g_unsupported_api ("SHGetFolderPath");
-       return mono_string_new (mono_domain_get (), "");
+       return mono_string_new_handle (mono_domain_get (), "", error);
 }
 
 MonoArray *
 mono_icall_get_logical_drives (void)
 {
        MonoError mono_error;
-       mono_error_init (&mono_error);
+       error_init (&mono_error);
 
        g_unsupported_api ("GetLogicalDriveStrings");
 
@@ -42,27 +44,25 @@ mono_icall_get_logical_drives (void)
        return NULL;
 }
 
-void
-mono_icall_broadcast_setting_change (void)
+MonoBoolean
+mono_icall_broadcast_setting_change (MonoError *error)
 {
-       MonoError mono_error;
-       mono_error_init (&mono_error);
+       error_init (error);
 
        g_unsupported_api ("SendMessageTimeout");
 
-       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "SendMessageTimeout");
-       mono_error_set_pending_exception (&mono_error);
+       mono_error_set_not_supported (error, G_UNSUPPORTED_API, "SendMessageTimeout");
 
        SetLastError (ERROR_NOT_SUPPORTED);
 
-       return;
+       return is_ok (error);
 }
 
 guint32
 mono_icall_drive_info_get_drive_type (MonoString *root_path_name)
 {
        MonoError mono_error;
-       mono_error_init (&mono_error);
+       error_init (&mono_error);
 
        g_unsupported_api ("GetDriveType");
 
@@ -76,7 +76,7 @@ gint32
 mono_icall_wait_for_input_idle (gpointer handle, gint32 milliseconds)
 {
        MonoError mono_error;
-       mono_error_init (&mono_error);
+       error_init (&mono_error);
 
        g_unsupported_api ("WaitForInputIdle");