Release 940405
[wine/gsoc-2012-control.git] / include / user.h
blob166a7070eabded1839ce033c0bb78576ca9b1133
1 /*
2 * USER definitions
4 * Copyright 1993 Alexandre Julliard
5 */
7 #ifndef USER_H
8 #define USER_H
10 #include "segmem.h"
11 #include "heap.h"
13 /* USER local heap */
15 #ifdef WINELIB
17 #define USER_HEAP_ALLOC(f,size) LocalAlloc (f, size)
18 #define USER_HEAP_REALLOC(handle,size,f) LocalReAlloc (handle,size,f)
19 #define USER_HEAP_ADDR(handle) LocalLock (handle)
20 #define USER_HEAP_FREE(handle) LocalFree (handle)
21 #else
23 extern MDESC *USER_Heap;
25 #define USER_HEAP_ALLOC(f,size) ((int)HEAP_Alloc(&USER_Heap,f,size) & 0xffff)
26 #define USER_HEAP_REALLOC(handle,size,f) ((int)HEAP_ReAlloc(&USER_Heap, \
27 USER_HEAP_ADDR(handle),size,f) & 0xffff)
28 #define USER_HEAP_ADDR(handle) ((void *)((handle)|((int)USER_Heap&0xffff0000)))
29 #define USER_HEAP_FREE(handle) (HEAP_Free(&USER_Heap,USER_HEAP_ADDR(handle)))
31 #endif /* WINELIB */
33 #endif /* USER_H */