home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / mapi / win16 / dev / smpcli / pvalloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-11  |  904 b   |  49 lines

  1. /*
  2.  -  P V A L L O C . H
  3.  -
  4.  *  Purpose:
  5.  *      Header file for sample memory manager.  Provides chained
  6.  *      memory data structures.
  7.  *
  8.  *  Copyright 1993-1995 Microsoft Corporation. All Rights Reserved.
  9.  */
  10.  
  11. #ifndef __PVALLOC_H__
  12. #define __PVALLOC_H__
  13.  
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17.  
  18. #define pvNull NULL
  19.  
  20. typedef unsigned long CB;
  21. typedef void FAR * PV;
  22. typedef char FAR * SZ;
  23. typedef BYTE FAR * PB;
  24.  
  25. /* Memory allocation node */
  26.  
  27. typedef struct
  28. {
  29.     HANDLE  hMem;
  30.     CB      cbSize;
  31.     PV      lpvNext;
  32.     PV      lpvBuf;
  33. } PVINFO, * PPVINFO;
  34.  
  35. #define cbPvMax (65520L-sizeof(PVINFO))
  36. #define cbPvMin (1024L-sizeof(PVINFO))
  37.  
  38. /* Memory manager function prototypes */
  39.  
  40. PV   PvAlloc(CB cbSize);
  41. PV   PvAllocMore(CB cbSize, PV lpvParent);
  42. BOOL PvFree(PV lpv);
  43.  
  44. #ifdef __cplusplus
  45. }       /* extern "C" */
  46. #endif
  47.  
  48. #endif  /* __PVALLOC_H__ */
  49.