remove GenericVectorTests from rsp (#17366)
[mono-project.git] / mono / metadata / marshal-windows-uwp.c
blobe4f3f8760423be9797b36a9ecaca703a180b3fa0
1 /**
2 * \file
3 * UWP marshal 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"
12 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
13 #include <windows.h>
14 #include "mono/metadata/marshal-windows-internals.h"
16 void *
17 mono_marshal_alloc_hglobal (size_t size, MonoError *error)
19 void* p = HeapAlloc (GetProcessHeap (), 0, size);
20 if (!p)
21 mono_error_set_out_of_memory (error, "");
22 return p;
25 gpointer
26 mono_marshal_realloc_hglobal (gpointer ptr, size_t size)
28 return HeapReAlloc (GetProcessHeap (), 0, ptr, size);
31 void
32 mono_marshal_free_hglobal (gpointer ptr)
34 HeapFree (GetProcessHeap (), 0, ptr);
37 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
39 MONO_EMPTY_SOURCE_FILE (marshal_windows_uwp);
40 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */