Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / marshal-windows-uwp.c
1 /**
2  * \file
3  * UWP marshal 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/marshal-windows-internals.h"
15
16 void *
17 mono_marshal_alloc_hglobal (size_t size)
18 {
19         return HeapAlloc (GetProcessHeap (), 0, size);
20 }
21
22 gpointer
23 mono_marshal_realloc_hglobal (gpointer ptr, size_t size)
24 {
25         return HeapReAlloc (GetProcessHeap (), 0, ptr, size);
26 }
27
28 void
29 mono_marshal_free_hglobal (gpointer ptr)
30 {
31         HeapFree (GetProcessHeap (), 0, ptr);
32         return;
33 }
34
35 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
36
37 MONO_EMPTY_SOURCE_FILE (marshal_windows_uwp);
38 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */