Build mono runtime under none desktop Windows API family, adjustments and cleanup.
[mono.git] / mono / metadata / marshal-windows-uwp.c
1 /*
2  * marshal-windows-uwp.c: UWP marshal support for Mono.
3  *
4  * Copyright 2016 Microsoft
5  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
6 */
7 #include <config.h>
8 #include <glib.h>
9 #include "mono/utils/mono-compiler.h"
10
11 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
12 #include <windows.h>
13 #include "mono/metadata/marshal-windows-internals.h"
14
15 void *
16 mono_marshal_alloc_hglobal (size_t size)
17 {
18         return HeapAlloc (GetProcessHeap (), 0, size);
19 }
20
21 gpointer
22 mono_marshal_realloc_hglobal (gpointer ptr, size_t size)
23 {
24         return HeapReAlloc (GetProcessHeap (), 0, ptr, size);
25 }
26
27 void
28 mono_marshal_free_hglobal (gpointer ptr)
29 {
30         HeapFree (GetProcessHeap (), 0, ptr);
31         return;
32 }
33
34 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
35
36 MONO_EMPTY_SOURCE_FILE (marshal_windows_uwp);
37 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */