home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fed0217s.zip / include / pipe.h < prev    next >
C/C++ Source or Header  |  2001-11-09  |  573b  |  37 lines

  1. /*
  2. ** Module   :PIPE.H
  3. ** Abstract :Named pipe server
  4. **
  5. ** Copyright (C) Sergey I. Yevtushenko
  6. **
  7. ** Log: Mon  05/11/2001 Created
  8. **
  9. */
  10.  
  11. #ifndef __PIPE_H
  12. #define __PIPE_H
  13.  
  14. #define MAX_DATA        16384
  15.  
  16. class NamedPipe
  17. {
  18.         unsigned long hPipe;
  19.         char* cData;
  20.  
  21.     public:
  22.  
  23.         NamedPipe();
  24.         NamedPipe(char* name);
  25.         ~NamedPipe();
  26.  
  27.         int IsValid()           { return (hPipe == (unsigned long)-1) ? 0:1;}
  28.  
  29.         char* ReadMsg();
  30.  
  31.         void Open(char*);
  32.         void Close();
  33. };
  34.  
  35. #endif  /*__PIPE_H*/
  36.  
  37.