Release 960521
[wine/multimedia.git] / include / user.h
blobe4eead73b9910418399048e8cff705a19b6bd141
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 extern WORD USER_HeapSel;
15 #define USER_HEAP_ALLOC(size) \
16 LOCAL_Alloc( USER_HeapSel, LMEM_FIXED, (size) )
17 #define USER_HEAP_REALLOC(handle,size) \
18 LOCAL_ReAlloc( USER_HeapSel, (handle), (size), LMEM_FIXED )
19 #define USER_HEAP_FREE(handle) \
20 LOCAL_Free( USER_HeapSel, (handle) )
21 #define USER_HEAP_LIN_ADDR(handle) \
22 ((handle) ? PTR_SEG_OFF_TO_LIN(USER_HeapSel, (handle)) : NULL)
24 #ifdef WINELIB
25 #define USER_HEAP_SEG_ADDR(handle) ((SEGPTR)(USER_HEAP_LIN_ADDR(handle)))
26 #else
27 #define USER_HEAP_SEG_ADDR(handle) \
28 ((handle) ? MAKELONG((handle), USER_HeapSel) : 0)
29 #endif /* WINELIB */
31 #endif /* USER_H */