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.
10 #include "mono/utils/mono-compiler.h"
12 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
14 #include "mono/metadata/marshal-windows-internals.h"
17 mono_marshal_alloc_hglobal (size_t size
, MonoError
*error
)
19 void* p
= HeapAlloc (GetProcessHeap (), 0, size
);
21 mono_error_set_out_of_memory (error
, "");
26 mono_marshal_realloc_hglobal (gpointer ptr
, size_t size
)
28 return HeapReAlloc (GetProcessHeap (), 0, ptr
, size
);
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) */