[runtime] Call error_init instead of mono_error_init (#4425)
[mono.git] / mono / metadata / icall-windows-uwp.c
index f27319863c34cd78dd3dcea12af8f3986cfc7d97..7867984e28ff8dc29723a44b21c84eae71df31d9 100644 (file)
@@ -6,9 +6,10 @@
 */
 #include <config.h>
 #include <glib.h>
+#include "mono/utils/mono-compiler.h"
 
 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
-#include <Windows.h>
+#include <windows.h>
 #include "mono/metadata/icall-windows-internals.h"
 
 MonoString *
@@ -29,7 +30,7 @@ MonoArray *
 mono_icall_get_logical_drives (void)
 {
        MonoError mono_error;
-       mono_error_init (&mono_error);
+       error_init (&mono_error);
 
        g_unsupported_api ("GetLogicalDriveStrings");
 
@@ -45,7 +46,7 @@ void
 mono_icall_broadcast_setting_change (void)
 {
        MonoError mono_error;
-       mono_error_init (&mono_error);
+       error_init (&mono_error);
 
        g_unsupported_api ("SendMessageTimeout");
 
@@ -61,7 +62,7 @@ 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");
 
@@ -75,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");
 
@@ -85,74 +86,7 @@ mono_icall_wait_for_input_idle (gpointer handle, gint32 milliseconds)
        return WAIT_TIMEOUT;
 }
 
-MonoBoolean
-mono_icall_get_process_working_set_size (gpointer handle, gsize *min, gsize *max)
-{
-       MonoError mono_error;
-       mono_error_init (&mono_error);
-
-       g_unsupported_api ("GetProcessWorkingSetSize");
-
-       mono_error_set_not_supported(&mono_error, G_UNSUPPORTED_API, "GetProcessWorkingSetSize");
-       mono_error_set_pending_exception (&mono_error);
-
-       SetLastError (ERROR_NOT_SUPPORTED);
-
-       return FALSE;
-}
-
-MonoBoolean
-mono_icall_set_process_working_set_size (gpointer handle, gsize min, gsize max)
-{
-       MonoError mono_error;
-       mono_error_init (&mono_error);
-
-       g_unsupported_api ("SetProcessWorkingSetSize");
-
-       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "SetProcessWorkingSetSize");
-       mono_error_set_pending_exception (&mono_error);
-
-       SetLastError (ERROR_NOT_SUPPORTED);
-
-       return FALSE;
-}
-
-gint32
-mono_icall_get_priority_class (gpointer handle)
-{
-       MonoError mono_error;
-       mono_error_init (&mono_error);
-
-       g_unsupported_api ("GetPriorityClass");
-
-       mono_error_set_not_supported (&mono_error, G_UNSUPPORTED_API, "GetPriorityClass");
-       mono_error_set_pending_exception (&mono_error);
-
-       SetLastError (ERROR_NOT_SUPPORTED);
-
-       return FALSE;
-}
-
-MonoBoolean
-mono_icall_set_priority_class (gpointer handle, gint32 priorityClass)
-{
-       MonoError mono_error;
-       mono_error_init (&mono_error);
-
-       g_unsupported_api ("SetPriorityClass");
-
-       mono_error_set_not_supported(&mono_error, G_UNSUPPORTED_API, "SetPriorityClass");
-       mono_error_set_pending_exception (&mono_error);
-
-       SetLastError (ERROR_NOT_SUPPORTED);
-
-       return FALSE;
-}
-
 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_icall_windows_uwp_quiet_lnk4221(void) {}
-#endif
+MONO_EMPTY_SOURCE_FILE (icall_windows_uwp);
 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */