home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / radi116c.zip / radius116c / src / radius / shrmemry.h < prev    next >
C/C++ Source or Header  |  1997-02-26  |  869b  |  39 lines

  1. #ifndef _SHRMEMRY_INCLUDED /* allow multiple inclusions */
  2. #define _SHRMEMRY_INCLUDED
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. /* Shared memory functions managed by this module ....
  9.    objects allocated by these calls cannot be freed by
  10.    C Runtime library malloc/free and vise versa */
  11.  
  12. void * SHmalloc(size_t size);
  13.  
  14. void SHfree(void * ptr);
  15.  
  16. void * SHrealloc(void *ptr, size_t size);
  17.  
  18. void * SHstrdup(char * str);
  19.  
  20.  
  21. /* Create shared memory with specified name of specified
  22.    size.
  23.    RETURN: TRUE if created.
  24.     */
  25. int CreateSharedMemory(char * shMemName, unsigned size);
  26.  
  27. /* Get access to shared memory as a client.  return
  28.    base of shared memory in 'pVoid' */
  29. int GetSharedMemory(char * shMemName, unsigned size, void ** pVoid);
  30.  
  31. void ReleaseSharedMemory();
  32.  
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36.  
  37. #endif /* _SHRMEMRY_INCLUDED */
  38.  
  39.