home *** CD-ROM | disk | FTP | other *** search
/ Windows Shareware GOLD / NuclearComputingVol3No1.cdr / other / f1490 / winpipe.h < prev    next >
C/C++ Source or Header  |  1990-12-29  |  2KB  |  66 lines

  1. /******************************************************************************
  2.  
  3.     WINPIPE.H
  4.  
  5.     This file provides defines and routine declarations for using
  6.     WINPIPE.DLL.
  7.  
  8. */
  9.  
  10. #define  PIPE_READ    (0x01)
  11. #define  PIPE_WRITE   (0x02)
  12. #define  PIPE_MONITOR (0x10)
  13.  
  14. #define PIPE_UNKNOWN    (-10)
  15. #define PIPE_STR2LONG   (-8)
  16. #define PIPE_BADWINDOW  (-7)
  17. #define PIPE_LONGNAME   (-6)
  18. #define PIPE_NOTFREE    (-5)
  19. #define PIPE_NORIGHTS    (-4)
  20. #define PIPE_BADPIPE    (-3)
  21. #define PIPE_FULL    (-2)
  22. #define PIPE_EMPTY      (-2)
  23. #define PIPE_NOMEMLOCK    (-1)
  24. #define PIPE_OK         (0)
  25.  
  26. #define Stdin           (0)
  27. #define Stdout          (1)
  28. #define Stderr          (2)
  29.  
  30. typedef  int    INT;
  31. typedef  int    PIPE;
  32.  
  33. /*  Utility functions    */
  34.  
  35. extern     PIPE FAR PASCAL ClosePipe(PIPE Pipe);
  36. extern     PIPE FAR PASCAL CreatePipe(HWND hWnd, LPSTR lpszPipeName, WORD wStyle, WORD wBufferSize, WORD wNotify);
  37. extern     PIPE FAR PASCAL OpenPipe(HWND hWnd, LPSTR lpszPipeName, WORD wStyle, WORD wNotify);
  38. extern     WORD FAR PASCAL PeekPipe(LPSTR lpBuffer, int Num, PIPE Pipe);
  39. extern     WORD FAR PASCAL PurgePipe(PIPE Pipe);
  40. extern     WORD FAR PASCAL QueryPipe(PIPE Pipe);
  41. extern     WORD FAR PASCAL ReleasePipe(PIPE Pipe);
  42.  
  43. /*  Pipe I/O functions    */
  44.  
  45. extern     WORD FAR PASCAL Pputc(char c, PIPE Pipe);
  46. extern     WORD FAR PASCAL Pputs(LPSTR lpszString, PIPE Pipe);
  47. extern     WORD FAR PASCAL Pgetc(PIPE Pipe);
  48. extern     char FAR * FAR PASCAL Pgets(LPSTR lpszString, int Num, PIPE Pipe);
  49.  
  50. extern     WORD FAR PASCAL Pread(LPSTR lpBuffer, int Num, PIPE Pipe);
  51. extern     WORD FAR PASCAL Pwrite(LPSTR lpBuffer,int ItemSize, int iCount, PIPE Pipe);
  52.  
  53.  
  54. /*  Standard pipe functions */
  55.  
  56. extern     WORD FAR PASCAL Wgetc();
  57. extern     char FAR * FAR PASCAL Wgets(LPSTR lpszString, int Num);
  58. extern     WORD FAR PASCAL Wputc(char c);
  59. extern     WORD FAR PASCAL Wputs(LPSTR lpszString);
  60.  
  61. #ifndef NOPRINTF
  62. extern int FAR cdecl WPRINTF(LPSTR,...);
  63. /*  Import libs do not have lower case  */
  64. #define Wprintf     WPRINTF
  65. #endif
  66.