[runtime] Call error_init instead of mono_error_init (#4425)
[mono.git] / mono / metadata / icall-windows-uwp.c
index 0b5afa2624bbf1b11bf6898ff4922bf55b909896..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");
 
@@ -87,8 +88,5 @@ mono_icall_wait_for_input_idle (gpointer handle, gint32 milliseconds)
 
 #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) */