[netcore] Make the load hook ALC-aware (#16012)
[mono-project.git] / mono / metadata / icall-windows-uwp.c
blob694335e18fea9e7cbebf47303afb134044f9a5fc
1 /**
2 * \file
3 * UWP icall support for Mono.
5 * Copyright 2016 Microsoft
6 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
7 */
8 #include <config.h>
9 #include <glib.h>
10 #include "mono/utils/mono-compiler.h"
11 #include <windows.h>
12 #include "mono/metadata/icall-windows-internals.h"
13 #include "mono/metadata/w32subset.h"
15 #if !HAVE_API_SUPPORT_WIN32_GET_COMPUTER_NAME
16 MonoStringHandle
17 mono_icall_get_machine_name (MonoError *error)
19 g_unsupported_api ("GetComputerName");
20 return mono_string_new_handle (mono_domain_get (), "mono", error);
22 #endif
24 #if !HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH
25 MonoStringHandle
26 mono_icall_get_windows_folder_path (int folder, MonoError *error)
28 error_init (error);
29 g_unsupported_api ("SHGetFolderPath");
30 return mono_string_new_handle (mono_domain_get (), "", error);
32 #endif
34 #if !HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS
35 MonoArrayHandle
36 mono_icall_get_logical_drives (MonoError *error)
38 g_unsupported_api ("GetLogicalDriveStrings");
40 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "GetLogicalDriveStrings");
42 SetLastError (ERROR_NOT_SUPPORTED);
44 return NULL_HANDLE_ARRAY;
46 #endif
48 #if !HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT
49 ICALL_EXPORT void
50 ves_icall_System_Environment_BroadcastSettingChange (MonoError *error)
52 g_unsupported_api ("SendMessageTimeout");
54 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "SendMessageTimeout");
56 SetLastError (ERROR_NOT_SUPPORTED);
58 #endif
60 #if !HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE
61 gint32
62 mono_icall_wait_for_input_idle (gpointer handle, gint32 milliseconds)
64 ERROR_DECL (error);
66 g_unsupported_api ("WaitForInputIdle");
68 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "WaitForInputIdle");
69 mono_error_set_pending_exception (error);
71 return WAIT_TIMEOUT;
73 #endif
75 MONO_EMPTY_SOURCE_FILE (icall_windows_uwp);