Release 950606
[wine/multimedia.git] / include / user.h
blobaf0ecdfcbf131f5cad6560b445309e84b938eeb3
1 /*
2 * USER definitions
4 * Copyright 1993 Alexandre Julliard
5 */
7 #ifndef USER_H
8 #define USER_H
10 #include "ldt.h"
11 #include "local.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_LIN_ADDR(handle) LocalLock (handle)
20 #define USER_HEAP_SEG_ADDR(handle) LocalLock (handle)
21 #define USER_HEAP_FREE(handle) LocalFree (handle)
22 #else
24 extern LPSTR USER_Heap;
25 extern WORD USER_HeapSel;
27 #define USER_HEAP_ALLOC(size) \
28 LOCAL_Alloc( USER_HeapSel, LMEM_FIXED, (size) )
29 #define USER_HEAP_REALLOC(handle,size) \
30 LOCAL_ReAlloc( USER_HeapSel, (handle), (size), LMEM_FIXED )
31 #define USER_HEAP_FREE(handle) \
32 LOCAL_Free( USER_HeapSel, (handle) )
33 #define USER_HEAP_LIN_ADDR(handle) \
34 ((handle) ? PTR_SEG_OFF_TO_LIN(USER_HeapSel, (handle)) : NULL)
35 #define USER_HEAP_SEG_ADDR(handle) \
36 ((handle) ? MAKELONG((handle), USER_HeapSel) : 0)
38 #endif /* WINELIB */
40 #endif /* USER_H */