Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / coree-windows-uwp.c
1 /**
2  * \file
3  * UWP coree support for Mono.
4  *
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
12 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
13 #include <windows.h>
14 #include "mono/metadata/coree-internals.h"
15
16 BOOL STDMETHODCALLTYPE
17 _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
18 {
19         g_unsupported_api ("_CorDllMain");
20         return FALSE;
21 }
22
23 __int32 STDMETHODCALLTYPE
24 _CorExeMain(void)
25 {
26         g_unsupported_api ("_CorExeMain");
27         ExitProcess (EXIT_FAILURE);
28 }
29
30 STDAPI
31 _CorValidateImage(PVOID *ImageBase, LPCWSTR FileName)
32 {
33         g_unsupported_api ("_CorValidateImage");
34         return E_UNEXPECTED;
35 }
36
37 HMODULE WINAPI
38 MonoLoadImage(LPCWSTR FileName)
39 {
40         g_unsupported_api ("MonoLoadImage");
41         return NULL;
42 }
43
44 void
45 mono_coree_set_act_ctx (const char *file_name)
46 {
47         g_unsupported_api ("CreateActCtx, ActivateActCtx");
48         SetLastError (ERROR_NOT_SUPPORTED);
49
50         return;
51 }
52
53 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
54
55 MONO_EMPTY_SOURCE_FILE (coree_windows_uwp);
56 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */