ole32: Use the global HeapAlloc() wrappers.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-02-02 01:03:56 +01:00 committed by Alexandre Julliard
parent 0c7863d9e9
commit f38ddaec6f
1 changed files with 2 additions and 11 deletions

View File

@ -30,6 +30,7 @@
#include <stdarg.h>
#include "wine/list.h"
#include "wine/heap.h"
#include "windef.h"
#include "winbase.h"
@ -259,7 +260,7 @@ void leave_apartment(struct oletls *info) DECLSPEC_HIDDEN;
static inline struct oletls *COM_CurrentInfo(void)
{
if (!NtCurrentTeb()->ReservedForOle)
NtCurrentTeb()->ReservedForOle = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct oletls));
NtCurrentTeb()->ReservedForOle = heap_alloc_zero(sizeof(struct oletls));
return NtCurrentTeb()->ReservedForOle;
}
@ -323,16 +324,6 @@ extern BOOL actctx_get_miscstatus(const CLSID*, DWORD, DWORD*) DECLSPEC_HIDDEN;
extern const char *debugstr_formatetc(const FORMATETC *formatetc) DECLSPEC_HIDDEN;
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
static inline HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src)
{
*dst = *src;